This repository was archived by the owner on Apr 10, 2025. It is now read-only.
-
Couldn't load subscription status.
- Fork 2
Microsoft.Extensions.Http Integration
Gísli Konráð Björnsson edited this page Jan 17, 2019
·
1 revision
We've integrated with Microsoft.Extensions.Http package. If it's installed in the service collection, the it is used to create HttpClients. Using HttpClientFactory from Microsoft.Extensions.Http is just a good idea.
To use Microsoft.Extensions.Http with Solid.Http, you just need to add the package.
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services
.AddHttpClient()
.AddSolidHttpCore();
}
}That's fine too. You don't have to use HttpClientFactory if you don't want to. We've implemented a naive implementation of IHttpClientFactory so that you won't have to.