Sisk

Class

HttpResponseExtensions

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

Provides useful extensions for HttpResponse objects.

C#
public static class HttpResponseExtensions

Inheritance #

object ← HttpResponseExtensions

Inherited Members #

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Methods #

NameDescription
WithContent<THttpResponse>(THttpResponse, string)Sets the content of the HTTP response to a string.
WithContent<THttpResponse>(THttpResponse, string, Encoding?, string)Sets the content of the HTTP response to a string with a specified encoding and MIME type.
WithContent<THttpResponse>(THttpResponse, HttpContent)Sets the content of the HTTP response to a specified HttpContent.
WithCookie<THttpResponse>(THttpResponse, string, string, DateTime?, TimeSpan?, string?, string?, bool?, bool?, string?)Adds a cookie to the HTTP response with specified parameters.
WithCookie<THttpResponse>(THttpResponse, Cookie)Adds a cookie to the HTTP response using a Cookie object.
WithHeader<THttpResponse>(THttpResponse, string, string)Adds a header to the HTTP response.
WithHeaders<THttpResponse>(THttpResponse, IDictionary<string, string?>)Adds multiple headers to the HTTP response from a dictionary.
WithHeaders<THttpResponse>(THttpResponse, StringKeyStoreCollection)Adds multiple headers to the HTTP response from a StringKeyStoreCollection.
WithStatus<THttpResponse>(THttpResponse, int)Sets the status code of the HTTP response using an integer.
WithStatus<THttpResponse>(THttpResponse, HttpStatusCode)Sets the status code of the HTTP response using an HttpStatusCode enum.
WithStatus<THttpResponse>(THttpResponse, in HttpStatusInformation)Sets the status of the HTTP response using HttpStatusInformation.

Type to search the documentation and the API reference.