Results.Created Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Created() |
Produces a Status201Created response. |
Created(String, Object) |
Produces a Status201Created response. |
Created(Uri, Object) |
Produces a Status201Created response. |
Created<TValue>(String, TValue) |
Produces a Status201Created response. |
Created<TValue>(Uri, TValue) |
Produces a Status201Created response. |
- Source:
- Results.cs
Produces a Status201Created response.
public static Microsoft.AspNetCore.Http.IResult Created ();
static member Created : unit -> Microsoft.AspNetCore.Http.IResult
Public Shared Function Created () As IResult
Returns
The created IResult for the response.
Applies to
ASP.NET Core 9.0 and ASP.NET Core 8.0
Product | Versions |
---|---|
ASP.NET Core | 8.0, 9.0 |
- Source:
- Results.cs
Produces a Status201Created response.
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
Parameters
- uri
- String
The URI at which the content has been created.
- value
- Object
The value to be included in the HTTP response body.
Returns
The created IResult for the response.
Applies to
ASP.NET Core 9.0 and other versions
Product | Versions |
---|---|
ASP.NET Core | 6.0, 7.0, 8.0, 9.0 |
- Source:
- Results.cs
Produces a Status201Created response.
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
Parameters
- uri
- Uri
The URI at which the content has been created.
- value
- Object
The value to be included in the HTTP response body.
Returns
The created IResult for the response.
Applies to
ASP.NET Core 9.0 and other versions
Product | Versions |
---|---|
ASP.NET Core | 6.0, 7.0, 8.0, 9.0 |
- Source:
- Results.cs
Produces a Status201Created response.
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
Type Parameters
- TValue
Parameters
- uri
- String
The URI at which the content has been created.
- value
- TValue
The value to be included in the HTTP response body.
Returns
The created IResult for the response.
Applies to
ASP.NET Core 9.0 and other versions
Product | Versions |
---|---|
ASP.NET Core | 7.0, 8.0, 9.0 |
- Source:
- Results.cs
Produces a Status201Created response.
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
Type Parameters
- TValue
Parameters
- uri
- Uri
The URI at which the content has been created.
- value
- TValue
The value to be included in the HTTP response body.
Returns
The created IResult for the response.
Applies to
ASP.NET Core 9.0 and other versions
Product | Versions |
---|---|
ASP.NET Core | 7.0, 8.0, 9.0 |