ApiController.StatusCode(HttpStatusCode) ApiController.StatusCode(HttpStatusCode) ApiController.StatusCode(HttpStatusCode) Method

Definition

Creates a StatusCodeResult with the specified status code.

[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.StatusCodeResult StatusCode (System.Net.HttpStatusCode status);
abstract member StatusCode : System.Net.HttpStatusCode -> Microsoft.AspNetCore.Mvc.StatusCodeResult
override this.StatusCode : System.Net.HttpStatusCode -> Microsoft.AspNetCore.Mvc.StatusCodeResult
Public Overridable Function StatusCode (status As HttpStatusCode) As StatusCodeResult

Parameters

status
HttpStatusCode HttpStatusCode HttpStatusCode

The HTTP status code for the response message

Returns

Applies to