Share via


ApiController.Created Method

Definition

Overloads

Created(String, Object)

Creates a CreatedResult (201 Created) with the specified values.

Created(Uri, Object)

Creates a CreatedResult (201 Created) with the specified values.

Created(String, Object)

Source:
ApiController.cs
Source:
ApiController.cs

Creates a CreatedResult (201 Created) with the specified values.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created (string location, object content);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Created : string * obj -> Microsoft.AspNetCore.Mvc.CreatedResult
override this.Created : string * obj -> Microsoft.AspNetCore.Mvc.CreatedResult
Public Overridable Function Created (location As String, content As Object) As CreatedResult

Parameters

location
String

The location at which the content has been created. Must be a relative or absolute URL.

content
Object

The content value to format in the entity body.

Returns

A CreatedResult with the specified values.

Attributes

Applies to

Created(Uri, Object)

Source:
ApiController.cs
Source:
ApiController.cs

Creates a CreatedResult (201 Created) with the specified values.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.CreatedResult Created (Uri uri, object content);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Created : Uri * obj -> Microsoft.AspNetCore.Mvc.CreatedResult
override this.Created : Uri * obj -> Microsoft.AspNetCore.Mvc.CreatedResult
Public Overridable Function Created (uri As Uri, content As Object) As CreatedResult

Parameters

uri
Uri

The location at which the content has been created.

content
Object

The content value to format in the entity body.

Returns

A CreatedResult with the specified values.

Attributes

Applies to