Created<TValue> Class

Definition

An IResult that on execution will write an object to the response with status code Created (201) and Location header.

C#
public sealed class Created<TValue> : Microsoft.AspNetCore.Http.IResult, Microsoft.AspNetCore.Http.IStatusCodeHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult, Microsoft.AspNetCore.Http.IValueHttpResult<TValue>, Microsoft.AspNetCore.Http.Metadata.IEndpointMetadataProvider

Type Parameters

TValue

The type of object that will be JSON serialized to the response body.

Inheritance
Created<TValue>
Implements

Properties

Location System.Object.Location
StatusCode

Gets the HTTP status code: Status201Created

Value

Gets the object result.

Methods

ExecuteAsync(HttpContext)

Write an HTTP response reflecting the result.

Explicit Interface Implementations

Applies to

Product Versions
ASP.NET Core 7.0, 8.0, 9.0