1.0.0 • Published 11 months ago

@axios-plugin/throttle v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@axios-plugin/throttle

限制axios发送请求的频率,避免过多的请求对服务器造成负担或浪费带宽资源。

安装

npm i @axios-plugin/throttle

使用

import { ThrottlePlugin } from '@axios-plugin/throttle'

axiosInstance = 
  pluginify(axios).use(new ThrottlePlugin({ maxTime: 1000 }).generate()

参数

ThrottleOptions

SignatureDescriptionTypeDefault
maxTime节流时间,默认是 500msnumber500
1.0.0

11 months ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.2-alpha.0

2 years ago