Table of Contents

Method WithHeader

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

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 THttpResponse

The HttpResponse object.

headerName string

The name of the header.

headerValue string

The 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 THttpResponse

The HttpResponse object.

headers NameValueCollection

The collection of HTTP headers.

Returns

THttpResponse

The self THttpResponse object.

Type Parameters

THttpResponse

The type which implements HttpResponse.