Method
HttpResponseExtensions.WithStatus<THttpResponse>
WithStatus<THttpResponse>(THttpResponse, int) #
Sets the status code of the HTTP response using an integer.
public static HttpResponse WithStatus<THttpResponse>(this THttpResponse response, int httpStatusCode) where THttpResponse : notnull, HttpResponseParameters #
response THttpResponse
httpStatusCode int
The integer HTTP status code.
Returns #
The modified HTTP response.
Type Parameters #
THttpResponse
WithStatus<THttpResponse>(THttpResponse, HttpStatusCode) #
Sets the status code of the HTTP response using an HttpStatusCode enum.
public static HttpResponse WithStatus<THttpResponse>(this THttpResponse response, HttpStatusCode statusCode) where THttpResponse : notnull, HttpResponseParameters #
response THttpResponse
statusCode HttpStatusCode
The HttpStatusCode to set.
Returns #
The modified HTTP response.
Type Parameters #
THttpResponse
WithStatus<THttpResponse>(THttpResponse, in HttpStatusInformation) #
Sets the status of the HTTP response using HttpStatusInformation.
public static HttpResponse WithStatus<THttpResponse>(this THttpResponse response, in HttpStatusInformation statusInformation) where THttpResponse : notnull, HttpResponseParameters #
response THttpResponse
statusInformation HttpStatusInformation
The HttpStatusInformation to set.
Returns #
The modified HTTP response.
Type Parameters #
THttpResponse