10/11/2026
You should be using IHttpClientFactory to create your HttpClients in .NET.
But why is this the recommended approach?
3 options exist
Number 1: use the IHttpClientFactory directly. The downside is you'll have to configure the HttpClient every time.
If you want to get a pre-configured HttpClient, you can use named or typed clients.
Follow me for more videos and codes: Code Adventure