How to unit test a class that consumes an HttpClient with IHttpClientFactory in ASP.NET Core?

added by DotNetKicks
12/27/2018 4:00:25 PM

2 Kicks, 168 Views

A few years ago, Microsoft introduced the HttpClient class as a modern substitute for HttpWebRequest to make web requests from .NET applications. Not only is this new API much easier to use, cleaner, and asynchronous, but it is also easily expandable. The HttpClient class has a constructor that accepts a HttpMessageHandler .


0 comments