Open mweatherill opened 5 years ago
@mweatherill you can write your own wrapper.
Have a look on: https://github.com/djmnz/RestFluencing/tree/master/src/restfluencing.Core/Client/HttpClientWrapper
config.ClientFactory = new HttpApiClientBuilder();
Let us know if doesn't work.
@mweatherill just merged the package to be compatible with .Net standard, first step to make it more compatible with those integration tests.
For the moment, I have added a extension that will help you leverage the client factory:
var config = new RestConfiguration();
var client = new HttpClient();
config.UsingWebApiClient(client);
You may still need to manually set the base url to the local server.
I will be building a AspNetMvc package to leverage the factory directly.
RestFluencing doesn't seem to work with .NET Core Integration Tests. It appears that all HTTP requests go over the network rather than direct to the in-memory test server.
I see that a HttpClient is constructed directly in src/restfluencing.Core/Client/HttpClientWrapper/HttpClient.cs:
I need to be able to pass in my own instance of HttpClient.