@erkelost/axios-ext-retry
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

@iel/axios-ext-retry

Axios 扩展失败重连功能。

安装

# 依赖 @iel/axios-ext
npm i @iel/axios-ext @iel/axios-ext-retry -S

用法

import { createAxios } from '@iel/axios-ext'
import AxiosExtRetryPlugin from '@iel/axios-ext-retry'
import axios from 'axios'

const http = createAxios(axios)

http.$axiosExt.use(AxiosExtRetryPlugin)

http
  .withRetry({ max: 3 })
  .get('/demo/list')
  .then((res) => {
    console.log(res)
  })

Package Sidebar

Install

npm i @erkelost/axios-ext-retry

Weekly Downloads

0

Version

1.0.5

License

MIT

Unpacked Size

9.47 kB

Total Files

6

Last publish

Collaborators

  • erkelost