axios-request-throttle
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

axios-request-throttle

Throttle axios request-per-second rate with 3 lines of code. The main difference with this module and others like axios-throttled is that you don't have to create a new axios instance, and by extension don't have to fix imports project-wide. Apply once and every axios.get, post, put, delete etc is throttled.

Installation

yarn add axios-request-throttle

or

npm i axios-request-throttle

Usage

import axios from 'axios';
import axiosThrottle from 'axios-request-throttle';

axiosThrottle.use(axios, { requestsPerSecond: 5 });

Package Sidebar

Install

npm i axios-request-throttle

Weekly Downloads

5,741

Version

1.0.0

License

MIT

Unpacked Size

5.25 kB

Total Files

4

Last publish

Collaborators

  • fakelag