axios-throttle-interceptor
v1.1.1
Published
A simple and lightweight axios interceptor to throttle requests
Maintainers
Readme
axios-throttle-interceptor
📦 Installation
npm install axios axios-throttle-interceptorpnpm
pnpm install axios axios-throttle-interceptoryarn
yarn add axios axios-throttle-interceptor🚀 Usage
import axios from 'axios';
import axiosThrottle from 'axios-throttle-interceptor';
const instance = axios.create();
axiosThrottle(instance, {
limit: 5,
interval: 1000,
onDelay: () => console.log('Request delayed due to throttling.'),
});
instance.get('...'); // The requests are now throttled.🤝 Contributing
Want to contribute? Awesome! To show your support is to star the project, or to raise issues on GitHub
Thanks again for your support, it is much appreciated! 🙏
License
MIT © Shahrad Elahi and contributors.
