C# Class Tailspin.Surveys.Web.Services.HttpClientService

This class wraps an instance of HttpClient configured with a handler that performs logging.
ファイルを表示 Open project: Azure-Samples/guidance-identity-management-for-multitenant-apps Class Usage Examples

Public Methods

Method Description
GetHttpClient ( ) : HttpClient

This method exposes the configured HttpClient member.

HttpClientService ( IHttpContextAccessor contextAccessor, ILoggerFactory loggerFactory, IOptions options ) : System

This constructor configures the base address of the HttpClient instance member with the value of the WebApiUrl if this value is found in configuration. This constructor also configures the HttpClient instance member with an instance of HttpClientLogHandler which requires an IHttpContextAccessor and a ILoggerFactory.

Method Details

GetHttpClient() public method

This method exposes the configured HttpClient member.
public GetHttpClient ( ) : HttpClient
return System.Net.Http.HttpClient

HttpClientService() public method

This constructor configures the base address of the HttpClient instance member with the value of the WebApiUrl if this value is found in configuration. This constructor also configures the HttpClient instance member with an instance of HttpClientLogHandler which requires an IHttpContextAccessor and a ILoggerFactory.
public HttpClientService ( IHttpContextAccessor contextAccessor, ILoggerFactory loggerFactory, IOptions options ) : System
contextAccessor IHttpContextAccessor
loggerFactory ILoggerFactory
options IOptions
return System