Closed velvolue closed 2 weeks ago
I must have gotten something mixed up.. I see now that passing a configuration delegate to AddHttpClient
is just calling ConfigureHttpClient
under the hood...
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Is your feature request related to a problem? Please describe.
We'd like to configure the
HttpClient
instance for each request, but usingConfigureHttpClient
only configures the namedHttpClient
and is not applied for every (Refit internal) call toCreateClient
.Describe the solution you'd like
Pass a delegate to configure
HttpClient
s when add Refit client.Describe alternatives you've considered
Using message handlers is an alternative, but it would be better to have the option of configuring the
HttpClient
.Describe suggestions on how to achieve the feature
AddRefitClient`1
should accept anAction<HttpClient>
parameter that is passed on toAddHttpClient
.Additional context
It should be relatively straight forward to implement this. If given the green light, I could attempt to make a PR.