How to pass HttpClientHandler to existing HttpClient?

3.7k Views Asked by At

I have HttpClient httpClient injected from outside of my class.

Inside my class I'm creating a new HttpClientHandler var handler = new HttpClientHandler() and setting its values.

I need to link HttpClientHandler to existing HttpClient the same way you can do it using the constructor: new HttpClient(handler)

Is it possible? I've tried looking for HttpClientHandler property within HttpClient but it does not exist. Is there any other way?

0

There are 0 best solutions below