C# Class Hobsons.WebApiHelpers.CustomHeaderHttpMessageHandler

The custom header http message handler.
Inheritance: System.Net.Http.DelegatingHandler
ファイルを表示 Open project: HobsonsEMSTechnology/WebApiHelpers

Protected Methods

Method Description
CustomHeaderHttpMessageHandler ( string customHeaderName ) : System.Net.Http

Initialises a new instance of the CustomHeaderHttpMessageHandler class.

DoesHeaderExist ( HttpRequestMessage requestMessage ) : bool

Checks whether header exists.

ModifyResponse ( HttpResponseMessage responseMessage ) : void

Modify the response.

SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task

Overrides the default execution.

Method Details

CustomHeaderHttpMessageHandler() protected method

Initialises a new instance of the CustomHeaderHttpMessageHandler class.
protected CustomHeaderHttpMessageHandler ( string customHeaderName ) : System.Net.Http
customHeaderName string /// The custom header name. ///
return System.Net.Http

DoesHeaderExist() protected method

Checks whether header exists.
protected DoesHeaderExist ( HttpRequestMessage requestMessage ) : bool
requestMessage System.Net.Http.HttpRequestMessage /// The request message. ///
return bool

ModifyResponse() protected abstract method

Modify the response.
protected abstract ModifyResponse ( HttpResponseMessage responseMessage ) : void
responseMessage System.Net.Http.HttpResponseMessage /// The response message. ///
return void

SendAsync() protected method

Overrides the default execution.
protected SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage /// The request. ///
cancellationToken System.Threading.CancellationToken /// The cancellation token. ///
return Task