问题
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);
来源:https://stackoverflow.com/questions/55718410/how-to-use-flurl-with-polly-without-factory