https://github.com/danielmackay/dotnet-api-retry
https://github.com/danielmackay/dotnet-api-retry
api-rest dotnet-6 polly
Last synced: 11 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/danielmackay/dotnet-api-retry
- Owner: danielmackay
- License: mit
- Created: 2022-09-22T13:56:27.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-09-23T01:01:23.000Z (over 3 years ago)
- Last Synced: 2023-08-01T23:05:07.316Z (over 2 years ago)
- Topics: api-rest, dotnet-6, polly
- Language: C#
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# .NET API Retry
[](https://github.com/danielmackay/dotnet-api-retry/actions/workflows/dotnet.yml)
[](https://github.com/danielmackay/dotnet-api-retry/blob/main/licence.md)
[](https://gitmoji.dev)
> Based off of Nick Chapsas's Youtube [video](https://youtu.be/nJH0PC2Pubs)
## 💡 Overview
Simple Web API that returns Star Wars People from an external API. `IHttpClientFactory` and `Polly` have been used to implement a transient retry policy.
The policy works as follows:
- Triggered via
- `HttpRequestException` being thrown
- HTTP 5XX being returned
- Http 408 (request timeout) being returned
- Retries
- Retry 5 times
- Exponential backoff with jitter between retries
## ⚡ Getting Started
- `dotnet run` or `dotnet watch run`
- Browser will launch and navigate to
## 📖 References
- [Starwars API](https://swapi.dev/)