文件名称:after-try:事后让axios通过拦截器重试
文件大小:4KB
文件格式:ZIP
更新时间:2024-06-18 23:17:43
JavaScript
后试 事后让axios通过拦截器重试 after-try 基于 设置重试: const { setupRetry } = require ( 'after-try' ) ; const axiosClient = axios . create ( ) ; const retryOptions = { retries : 3 } setupRetry ( axiosClient , retryOptions ) ; 覆盖特定请求: axiosClient . get ( '/user' , { 'after-try' : { retries : 5 , retryCondition = ( ) => { // you're specific retry condition logic }
【文件预览】:
after-try-master
----.gitignore(12B)
----package.json(297B)
----index.js(4KB)
----README.md(674B)
----yarn.lock(2KB)