- By directly I mean without Asp.Net Core IoC/DI helpers.
I didn't find docs about it and I think my current solution isn't optimal because the handler lifecyle isn't managed by the HttpClientFactory:
var proxiedHttpClientHandler = new HttpClientHandler() { Proxy = httpProxy };
_createHttpClient = () => HttpClientFactory.Create(proxiedHttpClientHandler);
Is there a better solution?
You can do something like this:
There's a good discussion here about using factory vs. manually instantiating an httpClient object.