4using Microsoft.Extensions.Logging;
27 readonly ILogger<AbstractHttpClientFactory>
logger;
38 ILogger<AbstractHttpClientFactory>
logger)
42 this.logger =
logger ??
throw new ArgumentNullException(nameof(
logger));
46#pragma warning disable IDE0079
47#pragma warning disable CA2000
50 logger.LogTrace(
"Creating client...");
69 innerClient?.Dispose();
73#pragma warning restore CA2000
74#pragma warning restore IDE0079
HttpRequestHeaders DefaultRequestHeaders
The HttpRequestHeaders used on every request.
readonly IHttpClientFactory httpClientFactory
The real IHttpClientFactory.
readonly ILogger< AbstractHttpClientFactory > logger
The ILogger for the AbstractHttpClientFactory.
readonly IAssemblyInformationProvider assemblyInformationProvider
The IAssemblyInformationProvider for the AbstractHttpClientFactory.
AbstractHttpClientFactory(IHttpClientFactory httpClientFactory, IAssemblyInformationProvider assemblyInformationProvider, ILogger< AbstractHttpClientFactory > logger)
Initializes a new instance of the AbstractHttpClientFactory class.
IHttpClient CreateClient()
Create a IHttpClient.A new IHttpClient.
For sending HTTP requests.