What is the LightInject equivalent for the recommened registration of HttpClients:
HostApplicationBuilder builder = Host.CreateApplicationBuilder(args);
IServiceCollection services = builder.Services;
services.AddHttpClient("my-client")
.AddStandardResilienceHandler(options =>
{
// Configure standard resilience options here
});
// Use the client
var host = builder.Build();
var httpClient = host.Services
.GetRequiredService<IHttpClientFactory>()
.CreateClient("my-client");
What is the LightInject equivalent for the recommened registration of HttpClients:
And the resolve:
Source: https://devblogs.microsoft.com/dotnet/building-resilient-cloud-services-with-dotnet-8/#tl;dr
Thanks