flurl

Set a default Polly policy with Flurl

元气小坏坏 提交于 2019-11-30 19:31:30
问题 I'm currently using Polly and Flurl together, but I have a common retry policy that I have to add to every request. I notice that Polly allows you to set a default using AddPolicyHandler(...) but this requires an IHttpClientBuilder and I can't see any way of getting hold of this from Flurl. I thought overloading DefaultHttpClientFactory might be the way to go, but that only gives me access to the HttpClient, not the IHttpClientBuilder. I know I could make my own HttpClients and pass them into