Results.Created 方法

定义

重载

Created()

生成 Status201Created 响应。

Created(String, Object)

生成 Status201Created 响应。

Created(Uri, Object)

生成 Status201Created 响应。

Created<TValue>(String, TValue)

生成 Status201Created 响应。

Created<TValue>(Uri, TValue)

生成 Status201Created 响应。

Created()

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult Created ();
static member Created : unit -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Created () As IResult

返回

为响应创建的 IResult

适用于

Created(String, Object)

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult Created (string uri, object? value);
public static Microsoft.AspNetCore.Http.IResult Created (string? uri, object? value);
static member Created : string * obj -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Created (uri As String, value As Object) As IResult

参数

uri
String

创建内容的 URI。

value
Object

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 IResult

适用于

Created(Uri, Object)

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult Created (Uri uri, object? value);
public static Microsoft.AspNetCore.Http.IResult Created (Uri? uri, object? value);
static member Created : Uri * obj -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Created (uri As Uri, value As Object) As IResult

参数

uri
Uri

创建内容的 URI。

value
Object

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 IResult

适用于

Created<TValue>(String, TValue)

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult Created<TValue> (string uri, TValue? value);
public static Microsoft.AspNetCore.Http.IResult Created<TValue> (string? uri, TValue? value);
static member Created : string * 'Value -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Created(Of TValue) (uri As String, value As TValue) As IResult

类型参数

TValue

参数

uri
String

创建内容的 URI。

value
TValue

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 IResult

适用于

Created<TValue>(Uri, TValue)

Source:
Results.cs

生成 Status201Created 响应。

public static Microsoft.AspNetCore.Http.IResult Created<TValue> (Uri uri, TValue? value);
public static Microsoft.AspNetCore.Http.IResult Created<TValue> (Uri? uri, TValue? value);
static member Created : Uri * 'Value -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Created(Of TValue) (uri As Uri, value As TValue) As IResult

类型参数

TValue

参数

uri
Uri

创建内容的 URI。

value
TValue

要包含在 HTTP 响应正文中的值。

返回

为响应创建的 IResult

适用于