Axios并发管理器
控制任何实例的并发请求。 使用axios拦截器实现
正在安装
$ npm install axios-concurrency
例子
const { ConcurrencyManager } = require ( "axios-concurrency" ) ;
const axios = require ( "axios" ) ;
let api = axios . create ( {
baseURL : "http://mypublicapi.com"
} ) ;
// a concurrency parameter of 1 makes all api requests secuential
const MAX_CONCURRENT_REQUESTS = 5 ;
// init your manager.
const manager = Concurrenc
1