ApiController.Content(HttpStatusCode, T) ApiController.Content(HttpStatusCode, T) ApiController.Content(HttpStatusCode, T) Method

Definition

Creates a NegotiatedContentResult<T> with the specified values.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual System.Web.Http.NegotiatedContentResult<T> Content<T> (System.Net.HttpStatusCode statusCode, T value);
abstract member Content : System.Net.HttpStatusCode * 'T -> System.Web.Http.NegotiatedContentResult<'T>
override this.Content : System.Net.HttpStatusCode * 'T -> System.Web.Http.NegotiatedContentResult<'T>
Public Overridable Function Content(Of T) (statusCode As HttpStatusCode, value As T) As NegotiatedContentResult(Of T)

Type Parameters

T

The type of content in the entity body.

Parameters

statusCode
HttpStatusCode HttpStatusCode HttpStatusCode

The HTTP status code for the response message.

value

The content value to negotiate and format in the entity body.

Returns

Applies to