aishek / Axios Rate Limit
Licence: mit
Rate limit for axios
Stars: ✭ 106
Programming Languages
javascript
184084 projects - #8 most used programming language
typescript
32286 projects
js
455 projects
Labels
Projects that are alternatives of or similar to Axios Rate Limit
Reactjs Spring Boot Crud Full Stack App
Learn how to develop a full-stack CRUD application using React as frontend and spring boot as backend.
Stars: ✭ 90 (-15.09%)
Mutual labels: axios
Xyy Vue
🎨基于vue+vue-router+vuex+axios+webpack开发的个人Demo《Qu约》
Stars: ✭ 1,316 (+1141.51%)
Mutual labels: axios
Django Auth0 Vue
A Django REST Framework + Vue.js CRUD Demo Secured Using Auth0
Stars: ✭ 99 (-6.6%)
Mutual labels: axios
Fontend
使用Node、Vue、ElementUI、iViewUI,验证码等等搭建一个综合性网站(含后台管理系统)
Stars: ✭ 97 (-8.49%)
Mutual labels: axios
React Bootstrap Webpack Starter
ReactJS 16.4 + new React Context API +react Router 4 + webpack 4 + babel 7+ hot Reload + Bootstrap 4 + styled-components
Stars: ✭ 103 (-2.83%)
Mutual labels: axios
Myxhr
TypeScript 重构 Axios 经验分享,包括开发技巧, API 实现,XMLHttpRequest 运用,单元测试等
Stars: ✭ 102 (-3.77%)
Mutual labels: axios
Spala
Spala (SPA LARAVEL): a modern lightweight CMS for Laravel and Vue developers (open source project).
Stars: ✭ 91 (-14.15%)
Mutual labels: axios
Governor
A rate-limiting library for Rust (formerly ratelimit_meter)
Stars: ✭ 99 (-6.6%)
Mutual labels: rate-limiting
Iview Vue Admin
iView vue Admin / An admin management system template
Stars: ✭ 105 (-0.94%)
Mutual labels: axios
Vue2 Shop
A shop developed with Vue2 + Vue-router + Axios + Vuex + Node + Express + MongoDB + Webpack
Stars: ✭ 103 (-2.83%)
Mutual labels: axios
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
import axios from 'axios';
import rateLimit from 'axios-rate-limit';
// 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 perMilliseconds
const http = rateLimit(axios.create(), { maxRequests: 2, perMilliseconds: 1000, maxRPS: 2 })
http.getMaxRPS() // 2
http.get('https://example.com/api/v1/users.json?page=1') // will perform immediately
http.get('https://example.com/api/v1/users.json?page=2') // will perform immediately
http.get('https://example.com/api/v1/users.json?page=3') // will perform after 1 second from the first one
// options hot-reloading also available
http.setMaxRPS(3)
http.getMaxRPS() // 3
http.setRateLimitOptions({ maxRequests: 6, perMilliseconds: 150 }) // same options as constructor
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].