Add a delegating handler to IHttpClientFactory.createClient() #24610
Unanswered
ankituipath
asked this question in
General
Replies: 1 comment
-
You wouldn't do it in create client, as it's part of client configuration. There's no way currently to flow arguments from the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I wanted to know if there is a feature planned to support adding a delegating handler to IHttpClientFactory.createClient() method.
Currently it only takes a name.
There is a workaround that we found which was by using IHttpMessageHandlerBuilderFilter and injecting an handler. Our handler takes a few parameters in its constructor and we had to jump through multiple hoops to pass this information at the handler, so that when we request a new client using the factory the handler is included in the pipeline with the right set of information.
If we had the functionality to specify the Delegating handlers in the createClient (just like we had in HttpClientFactory.Create() of asp.net) method that would have made our life much much easier. Right now the code is not clean, not readable and not maintainable.
Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions