axios-rate-limit
A rate limit for axios: set how many requests per interval should perform immediately, other will be delayed automatically.
Installing
yarn add axios-rate-limit
Usage
;; // sets max 2 requests per 1 second, other will be delayed// note maxRPS is a shorthand for perMilliseconds: 1000, and it takes precedence// if specified both with maxRequests and perMillisecondsconst http = http // 2http // will perform immediatelyhttp // will perform immediatelyhttp // will perform after 1 second from the first one // options hot-reloading also availablehttphttp // 3http // same options as constructor
A bit of advertising :-)
Since 2010 run my own software development company Cifronomika. We doing Ruby on Rails and JavaScript development. Feel free to contact