Method WithHeader
WithHeader<THttpResponse>(THttpResponse, string, string)
Sets an HTTP header in this HttpResponse.
public static THttpResponse WithHeader<THttpResponse>(this THttpResponse response, string headerName, string headerValue) where THttpResponse : HttpResponse
Parameters
responseTHttpResponseThe HttpResponse object.
headerNamestringThe name of the header.
headerValuestringThe header value.
Returns
- THttpResponse
The self
THttpResponseobject.
Type Parameters
THttpResponseThe type which implements HttpResponse.
WithHeader<THttpResponse>(THttpResponse, NameValueCollection)
Sets an list of HTTP headers in this HttpResponse.
public static THttpResponse WithHeader<THttpResponse>(this THttpResponse response, NameValueCollection headers) where THttpResponse : HttpResponse
Parameters
responseTHttpResponseThe HttpResponse object.
headersNameValueCollectionThe collection of HTTP headers.
Returns
- THttpResponse
The self
THttpResponseobject.
Type Parameters
THttpResponseThe type which implements HttpResponse.
WithHeader<THttpResponse>(THttpResponse, StringKeyStoreCollection)
Sets an list of HTTP headers in this HttpResponse.
public static THttpResponse WithHeader<THttpResponse>(this THttpResponse response, StringKeyStoreCollection headers) where THttpResponse : HttpResponse
Parameters
responseTHttpResponseThe HttpResponse object.
headersStringKeyStoreCollectionThe collection of HTTP headers.
Returns
- THttpResponse
The self
THttpResponseobject.
Type Parameters
THttpResponseThe type which implements HttpResponse.
English
Русский
Português
Español
Deutsch
中文 (简体)
日本語