<PackageReference Include="Microsoft.AspNet.WebApi.Client" Version="5.2.4" />

HttpClientFactory

public static class HttpClientFactory
public static HttpClient Create(DelegatingHandler[] handlers)

Creates a new HttpClient instance configured with the handlers provided and with an HttpClientHandler as the innermost handler.

public static HttpClient Create(HttpMessageHandler innerHandler, DelegatingHandler[] handlers)

Creates a new HttpClient instance configured with the handlers provided and with the provided innerHandler as the innermost handler.

Creates an instance of an HttpMessageHandler using the DelegatingHandler instances provided by handlers. The resulting pipeline can be used to manually create HttpClient or HttpMessageInvoker instances with customized message handlers.