sdk_csharp
sdk_csharp copied to clipboard
Added RetryHandler. (bunq/sdk_csharp#80)
- Closes bunq/sdk_csharp#80
- [x] Tested
@OGKevin I don't see why my commit message is failed, the regex is a full match.

Yea the regex failure seems magic to me as well. But to my eyes it loos good so we will ignore it 😉
@nduijvelshoff are you going to finish this ?
@OGKevin Hi Kevin, I can do this... Just a bit busy this week. :-)
I'll check it on Monday. Off for the weekend.
On Jun 29, 2018 16:34, Kevin Hellemun [email protected] wrote:
@OGKevin commented on this pull request.
In BunqSdk/Http/RetryHandler.cshttps://github.com/bunq/sdk_csharp/pull/106#discussion_r199178975:
+using System.Net.Http; +using System.Threading; +using System.Threading.Tasks; +using Polly;
+namespace Bunq.Sdk.Http +{
- public class RetryHandler : DelegatingHandler
- {
-
public RetryHandler(HttpClientHandler handler) : base(handler) { } -
protected override Task<HttpResponseMessage> SendAsync( -
HttpRequestMessage request, -
CancellationToken cancellationToken) => -
Policy -
.Handle<HttpRequestException>()
Hmm i meant to only retry when this exception is thrown TooManyRequestsException Cant you use this exception to catch and handle ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/bunq/sdk_csharp/pull/106#discussion_r199178975, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ADmub1dzoiWAyt2hlIhFrXIanwq58DQEks5uBjrhgaJpZM4UzoCV.