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

This class wraps an instance of HttpClient configured with a handler that performs logging.
Afficher le fichier Open project: Azure-Samples/guidance-identity-management-for-multitenant-apps Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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

HttpClientService() public méthode

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
Résultat System