Results.Created 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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 。