A tiny HTTP 429 Retry-After interceptor for axios, version 2.1.0. This package intercepts HTTP 429 Too Many Requests errors, reads the Retry-After header, and automatically retries the request after the specified delay. It is designed to be lightweight and integrates as an axios response interceptor. The package is actively maintained and supports customization of retry conditions, wait logic, and retry request handling. Unlike broader retry libraries, it focuses specifically on Retry-After behavior. It requires axios ^1.0.0 as a peer dependency and Node.js >= 14.
npm install axios-retry-afterNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic setup: import axios and retry, create an axios client, attach retry interceptor, and make a GET request that will automatically retry on 429.
Use retry(client) when adding to interceptors, not retry() or retry(config).
Use import retry from 'axios-retry-after' or const retry = require('axios-retry-after').Do: client.interceptors.response.use(null, retry(client)).
Update to Node >= 14 and use import syntax or dynamic require() as require('axios-retry-after').default.Use import retry from 'axios-retry-after' or const retry = require('axios-retry-after') (CommonJS).Run npm install axios-retry-after --save.
Ensure retry(client) is passed to the interceptor, e.g., client.interceptors.response.use(null, retry(client)).