axios-multibase

0.1.0 • Public • Published

axios-multibase

Build Status Coverage Status dependencies Status devDependencies Status JavaScript Style Guide

Multiple baseURL support for axios.

Install

npm install axios-multibase

Usage

const axios = require('axios')

axios.interceptors.request.use(multibase)

axios.get('/', {
  // Use multiple baseURLs with comma seperated:
  baseURL: 'http://host1/,http://host2/,http://host3/'
}).then(response => {
  console.log(response.data)
})

axios.get('/', {
  // Use baseURL array:
  baseURL: ['http://host1/', 'http://host2/', 'http://host3/']
}).then(response => {
  console.log(response.data)
})

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i axios-multibase

Weekly Downloads

4

Version

0.1.0

License

MIT

Unpacked Size

6.05 kB

Total Files

7

Last publish

Collaborators

  • gerhut