multiple-axios
TypeScript icon, indicating that this package has built-in type declarations

0.22.0 • Public • Published

multiple-axios

npm version build status code coverage

多端通用的请求库,在axios的基础上,支持小程序的请求。

Features

  • base axios@0.19.0
  • 支持浏览器,node,微信小程序,百度智能小程序
  • api方法与axios一致
  • 小程序暂不支持上传,下载功能

Case

  • 适合小程序各种框架,wepympvuetaro

Usage

Install multiple-axios.js using npm:

$ npm install multiple-axios

Performing a GET request

const axios = require('axios');
 
// Make a request for a user with a given ID
axios.get('/user?ID=12345')
  .then(function (response) {
    // handle success
    console.log(response);
  })
  .catch(function (error) {
    // handle error
    console.log(error);
  })
  .then(function () {
    // always executed
  });

Document

API

Support

browser node 微信 百度
upload
download
timeout
dataType
responseType
withCredentials
auth
xsrfCookieName
xsrfHeaderName
onUploadProgress
onDownloadProgress
maxContentLength
maxRedirects
httpAgent
httpsAgent
proxy

More

  • 由于支付宝暂不支持请求本地服务,期待支持
  • 快应用调研中

License

MIT

Package Sidebar

Install

npm i multiple-axios

Weekly Downloads

1

Version

0.22.0

License

MIT

Unpacked Size

459 kB

Total Files

109

Last publish

Collaborators

  • hanmingpan