Created
October 28, 2024 20:08
-
-
Save javierguerrero/9bf4cf1a20f6307dcf8523a4f7e76595 to your computer and use it in GitHub Desktop.
exception_handling_csharp_chapter5_6.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var policy = Policy | |
.Handle<HttpRequestException>() | |
.WaitAndRetry(3, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt))); | |
policy.Execute(() => RealizarLlamadaHttp()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment