TypedResults.Created 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
Created()
Status201Created產生回應。
public static Microsoft.AspNetCore.Http.HttpResults.Created Created ();
static member Created : unit -> Microsoft.AspNetCore.Http.HttpResults.Created
Public Shared Function Created () As Created
傳回
為回應建立 Created 的 。
適用於
Created(String)
Status201Created產生回應。
public static Microsoft.AspNetCore.Http.HttpResults.Created Created (string uri);
public static Microsoft.AspNetCore.Http.HttpResults.Created Created (string? uri);
static member Created : string -> Microsoft.AspNetCore.Http.HttpResults.Created
Public Shared Function Created (uri As String) As Created
參數
- uri
- String
建立內容的 URI。
傳回
為回應建立 Created 的 。
適用於
Created(Uri)
Status201Created產生回應。
public static Microsoft.AspNetCore.Http.HttpResults.Created Created (Uri uri);
public static Microsoft.AspNetCore.Http.HttpResults.Created Created (Uri? uri);
static member Created : Uri -> Microsoft.AspNetCore.Http.HttpResults.Created
Public Shared Function Created (uri As Uri) As Created
參數
- uri
- Uri
建立內容的 URI。
傳回
為回應建立 Created 的 。
適用於
Created<TValue>(String, TValue)
Status201Created產生回應。
public static Microsoft.AspNetCore.Http.HttpResults.Created<TValue> Created<TValue> (string uri, TValue? value);
public static Microsoft.AspNetCore.Http.HttpResults.Created<TValue> Created<TValue> (string? uri, TValue? value);
static member Created : string * 'Value -> Microsoft.AspNetCore.Http.HttpResults.Created<'Value>
Public Shared Function Created(Of TValue) (uri As String, value As TValue) As Created(Of TValue)
類型參數
- TValue
將 JSON 序列化為回應主體的物件類型。
參數
- uri
- String
建立內容的 URI。
- value
- TValue
要包含在 HTTP 回應主體中的值。
傳回
為回應建立 Created<TValue> 的 。
適用於
Created<TValue>(Uri, TValue)
Status201Created產生回應。
public static Microsoft.AspNetCore.Http.HttpResults.Created<TValue> Created<TValue> (Uri uri, TValue? value);
public static Microsoft.AspNetCore.Http.HttpResults.Created<TValue> Created<TValue> (Uri? uri, TValue? value);
static member Created : Uri * 'Value -> Microsoft.AspNetCore.Http.HttpResults.Created<'Value>
Public Shared Function Created(Of TValue) (uri As Uri, value As TValue) As Created(Of TValue)
類型參數
- TValue
將 JSON 序列化為回應主體的物件類型。
參數
- uri
- Uri
建立內容的 URI。
- value
- TValue
要包含在 HTTP 回應主體中的值。
傳回
為回應建立 Created<TValue> 的 。