fetch-retry-agent
v0.3.0
Published
A small resilient fetch wrapper with retries, backoff, jitter, timeout, and optional https.Agent support.
Maintainers
Readme
fetch-retry-agent
A small resilient fetch wrapper with retries, exponential backoff, jitter, timeout (AbortController) and optional https.Agent support.
Install
npm install --save fetch-retry-agentQuick example
import { createFetchClient } from "fetch-retry-agent";
const client = createFetchClient({});
const res = await client.fetchWithRetry("https://example.com/api", { retries: 2, timeoutMs: 5000 });
console.log(await res.text());See src/ for types and usage.
