Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@axios-use/plugins

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axios-use/plugins

Plugins for Axios

alpha
latest
Source
npmnpm
Version
0.1.0-alpha.0
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

@axios-use/plugins

Plugins for Axios

Interceptors

Retry

A Axios interceptor to retry requests. Intercept AxiosError code ERR_NETWORK and ETIMEDOUT report errors, try to retry again.

import { retryInterceptorArgs } from "@axios-use/plugins";
// or
import retryInterceptorArgs from "@axios-use/plugins/retry";

axios.interceptors.response.use(...retryInterceptorArgs);
configtypedefaultexplain
retrynumber-number of retries
retryDelaynumber1000millisecond of retry delay
axios({
  method: "get",
  url: "/api/users",
  /** number of retries */
  retry: 1,
  /** millisecond of retry delay @default 1000 */
  retryDelay: 1200,
});

License

MIT

Keywords

axios

FAQs

Package last updated on 20 Apr 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts