C# Класс Tailspin.Surveys.Web.Services.HttpClientService

This class wraps an instance of HttpClient configured with a handler that performs logging.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

GetHttpClient() публичный Метод

This method exposes the configured HttpClient member.
public GetHttpClient ( ) : HttpClient
Результат System.Net.Http.HttpClient

HttpClientService() публичный Метод

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
Результат System