Sisk

Method

HttpResponseExtensions.WithHeaders<THttpResponse>

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

WithHeaders<THttpResponse>(THttpResponse, IDictionary<string, string?>) #

Adds multiple headers to the HTTP response from a dictionary.

C#
public static THttpResponse WithHeaders<THttpResponse>(this THttpResponse response, IDictionary<string, string?> headers) where THttpResponse : notnull, HttpResponse

Parameters #

response THttpResponse

headers IDictionary<string, string?>

A dictionary of header names and their values.

Returns #

THttpResponse

The modified HTTP response.

Type Parameters #

THttpResponse

WithHeaders<THttpResponse>(THttpResponse, StringKeyStoreCollection) #

Adds multiple headers to the HTTP response from a StringKeyStoreCollection.

C#
public static THttpResponse WithHeaders<THttpResponse>(this THttpResponse response, StringKeyStoreCollection headers) where THttpResponse : notnull, HttpResponse

Parameters #

response THttpResponse

headers StringKeyStoreCollection

A StringKeyStoreCollection of header names and their values.

Returns #

THttpResponse

The modified HTTP response.

Type Parameters #

THttpResponse

Type to search the documentation and the API reference.