Simple and opinionated lib that adds retries out of the box to native Node.js fetch
npm install fetch-with-retriesFetch With Retries is a TypeScript library that provides a robust way to make requests to an API with automatic retry logic.
It's designed to handle both network errors and service issues, such as rate limiting.





- Automatic retries for network errors and certain HTTP status codes.
- Exponential backoff for retry delays.
- Support for Retry-After and X-RateLimit-Reset headers.
- Support for custom rate limit headers (i.e.: X-RateLimit-Wait)
- Customizable retry conditions.
- Timeout option for the fetch request.
- Allow to abort wait between retries with fetch signal and AbortController.
``bash``
npm install fetch-with-retries
Fetch With Retries is MIT licensed.