tmenier / Flurl

Fluent URL builder and testable HTTP client for .NET

Home Page:https://flurl.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make Flurl.Http compatible with Polly v8

jassent opened this issue · comments

Flurl and Flurl.Http are an awesome combo. Unfortunately they are currently incompatible with Polly v8 for implementing retry/resilience logic.

The Flurl.Http AddMiddleware() method works great with Polly v7 but is incompatible with Polly v8.

The issue is that Polly v8 doesn't provide a DelegatingHandler. So I guess this more of a Polly v8 issue than a Flurl.Http issue.

This Sundry.Extensions.Http.Polly seems to get pretty close on how to setup a DelegatingHandler. Refer to the PollyStrategyHttpMessageHandler.cs

Here is a post on StackOverlow with a workaround for getting Flurl.Http to work with Polly v8.

Thank you again for a great library!

I think there could be some useful information here for #346, which is a high post-4.0 priority. Could you add these comments there? At its core I don't think this a separate issue, and I'd rather keep it all together. Thanks!

Moved to #346