Method
HttpResponseExtensions.WithHeaders<THttpResponse>
WithHeaders<THttpResponse>(THttpResponse, IDictionary<string, string?>) #
Adds multiple headers to the HTTP response from a dictionary.
public static THttpResponse WithHeaders<THttpResponse>(this THttpResponse response, IDictionary<string, string?> headers) where THttpResponse : notnull, HttpResponseParameters #
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.
public static THttpResponse WithHeaders<THttpResponse>(this THttpResponse response, StringKeyStoreCollection headers) where THttpResponse : notnull, HttpResponseParameters #
response THttpResponse
headers StringKeyStoreCollection
A StringKeyStoreCollection of header names and their values.
Returns #
THttpResponse
The modified HTTP response.
Type Parameters #
THttpResponse