Testing Autorest with HttpClientFactory
In this solution I'm trying to integrate
Microsoft.Extensions.Http with auto generated autorest clients.
Main problems are:
- Initialization of the generated client:
The generated client doesn't come with overloads which accept an
HttpClient(only protected ctor)
- In addition, we have to pass in the base uri and probably credentials
- Create a custom partial client class for a custom ctor to set the
- Change autorest runtime library to work with
IHttpClientFactory=> bigger change and potentially too many dependencies added
HttpClientHandlers => would be the optiomal solution.