26 Dictionary<string, string> headers,
27 CancellationToken cancel =
default)
29 HttpResponseMessage response;
32 var policyResult = await _cfg.RetryConfiguration.RetryPolicy
33 .ExecuteAndCaptureAsync(async () => await _cfg.HttpClient.SendAsync(CreateHttpRequest(path, body, headers), cancel))
34 .ConfigureAwait(
false);
36 if (policyResult.Outcome == OutcomeType.Successful)
38 response = policyResult.Result;
42 throw policyResult.FinalException;
49 private HttpRequestMessage CreateHttpRequest(
string path, Stream body, Dictionary<string, string> headers)