Skip to content

Promise based HTTP client for the browser and node.js

License

Notifications You must be signed in to change notification settings

hanmingpan/multiple-axios

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Promise based HTTP client for the browser and node.js

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 91.7%
  • TypeScript 4.5%
  • HTML 3.4%
  • Other 0.4%