Remove Accept-Encoding Header in Flurl.Http
Flurl.Http sends in every Request the following Header:
Update from IFlurlClientFactory to IFlurlClientCache – Do I need using around IFlurlClientFactory.GetOrAdd()?
I have recently updated from the old IFlurlClientFactory to the new IFlurlClientCache and thus applied all the required changes.
How to move away from CustomHttpClientFactory in Flurl 4.0?
What we have implemented currently is something like this: https://v3.flurl.dev/docs/configuration/#httpclientfactory with the CustomHttpClientFactory
being a BearerTokenManagingHttpClientFactory
which inherits DefaultHttpClientFactory and overrides CreateHttpClient()
and CreateMessageHandler()
methods. It adds some headers in the override of CreateHttpClient
and returns something called BearerTokenMessageHandler
object in the override of CreateMessageHandler
. BearerTokenMessageHandler
itself inherits DelegatingHandler
.