How to use Flurl with Polly without factory

2019-08-18 06:45发布

问题:

Following from Set a default Polly policy with Flurl

How do I use Polly with Flurl without the factory? This only calls it once

string s = await Policy
                        .Handle<HttpRequestException> ()
                        .OrResult <HttpResponseMessage> (r => !r.IsSuccessStatusCode)
                        .RetryAsync (5)
                        .ExecuteAsync (() => { Console.WriteLine ("Retry"); return "http://127.0.0:7071/".GetAsync (); })
                        .ReceiveString ()
                        .ConfigureAwait (false);
标签: polly flurl