C# Class Tailspin.Surveys.Web.Logging.HttpClientLogHandler

This is a Delegating handlers which intercepts calls made to the WebService. Logs timing information and HttpStatus codes of the remote calls.
Inheritance: System.Net.Http.DelegatingHandler
ファイルを表示 Open project: Azure-Samples/guidance-identity-management-for-multitenant-apps Class Usage Examples

Public Methods

Method Description
HttpClientLogHandler ( HttpMessageHandler innerHandler, ILogger logger, IHttpContextAccessor contextAccessor ) : System.Net.Http

Protected Methods

Method Description
SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task

Overrides the SendAsync method of the DelegatingHandler for the purpose of logging REST call success or failure events along with timing information and status codes

Method Details

HttpClientLogHandler() public method

public HttpClientLogHandler ( HttpMessageHandler innerHandler, ILogger logger, IHttpContextAccessor contextAccessor ) : System.Net.Http
innerHandler System.Net.Http.HttpMessageHandler
logger ILogger
contextAccessor IHttpContextAccessor
return System.Net.Http

SendAsync() protected method

Overrides the SendAsync method of the DelegatingHandler for the purpose of logging REST call success or failure events along with timing information and status codes
protected SendAsync ( HttpRequestMessage request, CancellationToken cancellationToken ) : Task
request System.Net.Http.HttpRequestMessage
cancellationToken System.Threading.CancellationToken
return Task