dotNet Core 2.1. NET Core

How to use HttpClientFactory Inside Program.cs

Full source code here. Over the past week I have written a few articles about HttpClientFactory and dependency injection in .NET Core 2.1. There is one scenario I didn’t deal with - calling a HttpClient from inside the Main method in Program.