A lightweight fetch wrapper that adds configurable retry logic to HTTP requests. Version 0.2.8 is the latest stable release, with no regular release cadence. It supports exponential backoff, customizable retry conditions based on status codes or network failures, and global error limits. Unlike more opinionated libraries like axios-retry, stubborn-fetch offers fine-grained control over retry timing and per-request options while remaining minimal in size.
npm install stubborn-fetchNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Configures a GET request with 3 retries on server errors or network failures using exponential backoff.
Set minimumStatusCodeForRetry to 500 or implement shouldRetry to exclude certain status codes.
Set retryOnNetworkFailure: true in options.
Only 'exponential' and 'linear' are supported; custom timing requires implementing your own retry logic.
Use import { StubbornFetchRequest } from 'stubborn-fetch' instead of import StubbornFetchRequest from ...Use 'exponential' or 'linear' for timingFunction.
No dependency data recorded yet.