Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@nuskin/axios-util

Package Overview
Dependencies
Maintainers
5
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nuskin/axios-util

An Axios utility ...

  • 1.0.2
  • npm
  • Socket score

Version published
Weekly downloads
677
decreased by-39.01%
Maintainers
5
Weekly downloads
 
Created
Source

@nuskin/axios-util

axios-util allows you to use Axios in the exact same way you would use Axios by itself, with one exception. axios-util builds the retry and timeout resiliency patterns into Axios for you.

The default timeout has been set to 10000ms.

Retry has been implemented with the axios-retry module. All defaults of axios-retry are used except for retryDelay. retryDelay is set to axiosRetry.exponentialDelay

Installing

Usng npm:

npm add @nuskin/axios-util

Usng yarn:

yarn add @nuskin/axios-util

Example usage

const { axios } = require('@nuskin/axios-util')

// Now use axios as you normally would

Customizing retry

You can customize your retry logic by accessing axios-retry.

const { axios, axiosRetry } = require('@nuskin/axios-util')

// Custom retry delay
axiosRetry(axios, { retryDelay: (retryCount) => {
  return retryCount * 1000;
}})

Other possibilities for axios-util

Resources

  • Changelog could go here

License

MIT

FAQs

Package last updated on 02 Feb 2021

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc