.NET Core 2.1 comes with this new factory called HttpClientFactory, but I can\'t figure out how to mock it to unit test some methods that include REST service c
This code threw this exception for me, System.InvalidOperationException: The request does not have an associated configuration object or the provided configuration was null.
So included this in the test method, and it works.
var configuration = new HttpConfiguration();
var request = new HttpRequestMessage();
request.SetConfiguration(configuration);