Raise an Error in ConfigureHttpClient
when custom IForwarderHttpClientFactory
is added
#1799
Labels
Type: Idea
This issue is a high-level idea for discussion.
Milestone
What should we add or change to make your life better?
Throw an exception in
ConfigureHttpClient
when customIForwarderHttpClientFactory
is added stating that "You couldn't callConfigureHttpClient
when another type is added forIForwarderHttpClientFactory
. "Why is this important to you?
I had
ConfigureHttpClient
in my code to configureSslOptions
and lately I added a customIForwarderHttpClientFactory
. Now this wouldn't work becauseConfigureHttpClient
would add its ownIForwarderHttpClientFactory
and ignore theDiagnosticsHandlerFactory
. I couldn't figure out whyDiagnosticsHandlerFactory
wasn't working until I checked the source code.I suggest to throw an exception in
ConfigureHttpClient
if any other implementation ofIForwarderHttpClientFactory
besideForwarderHttpClientFactory
is added, in order to reduce the debugging time for others.Btw this is my code:
The text was updated successfully, but these errors were encountered: