Sisk

Method

HttpResponseExtensions.WithStatus<THttpResponse>

Namespace
Sisk.Core.Http
Assembly
Sisk.Core.dll

WithStatus<THttpResponse>(THttpResponse, int) #

Sets the status code of the HTTP response using an integer.

C#
public static HttpResponse WithStatus<THttpResponse>(this THttpResponse response, int httpStatusCode) where THttpResponse : notnull, HttpResponse

Parameters #

response THttpResponse

httpStatusCode int

The integer HTTP status code.

Returns #

HttpResponse

The modified HTTP response.

Type Parameters #

THttpResponse

WithStatus<THttpResponse>(THttpResponse, HttpStatusCode) #

Sets the status code of the HTTP response using an HttpStatusCode enum.

C#
public static HttpResponse WithStatus<THttpResponse>(this THttpResponse response, HttpStatusCode statusCode) where THttpResponse : notnull, HttpResponse

Parameters #

response THttpResponse

statusCode HttpStatusCode

The HttpStatusCode to set.

Returns #

HttpResponse

The modified HTTP response.

Type Parameters #

THttpResponse

WithStatus<THttpResponse>(THttpResponse, in HttpStatusInformation) #

Sets the status of the HTTP response using HttpStatusInformation.

C#
public static HttpResponse WithStatus<THttpResponse>(this THttpResponse response, in HttpStatusInformation statusInformation) where THttpResponse : notnull, HttpResponse

Parameters #

response THttpResponse

statusInformation HttpStatusInformation

The HttpStatusInformation to set.

Returns #

HttpResponse

The modified HTTP response.

Type Parameters #

THttpResponse

Type to search the documentation and the API reference.