Basic usage IHttpClientFactory
Register it
//Startup.cs
public void ConfigureServices(IServiceCollection services)
{
...
services.AddHttpClient();
}
Use it
//HealthController.cs
private readonly IHttpClientFactory _clientFactory;
public HealthController(IHttpClientFactory clientFactory)
{
_clientFactory = clientFactory;
}