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
response
THttpResponseThe HttpResponse object.
headerName
stringThe name of the header.
headerValue
stringThe header value.
Returns
- THttpResponse
The self
THttpResponse
object.
Type Parameters
THttpResponse
The 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
response
THttpResponseThe HttpResponse object.
headers
NameValueCollectionThe collection of HTTP headers.
Returns
- THttpResponse
The self
THttpResponse
object.
Type Parameters
THttpResponse
The type which implements HttpResponse.
WithHeader<THttpResponse>(THttpResponse, StringKeyStore)
Sets an list of HTTP headers in this HttpResponse.
public static THttpResponse WithHeader<THttpResponse>(this THttpResponse response, StringKeyStore headers) where THttpResponse : HttpResponse
Parameters
response
THttpResponseThe HttpResponse object.
headers
StringKeyStoreThe collection of HTTP headers.
Returns
- THttpResponse
The self
THttpResponse
object.
Type Parameters
THttpResponse
The type which implements HttpResponse.