基于 Promise 的 HTTP 请求库,适用于各大小程序平台。
 
Go to file
zjx0905 8bd8a54f02 docs: 新增健全文档 2023-03-25 16:22:01 +08:00
.github/workflows ci: 新增 docs 自动部署脚本 2023-03-25 14:16:10 +08:00
docs docs: 新增健全文档 2023-03-25 16:22:01 +08:00
scripts ci: 新增 docs 自动部署脚本 2023-03-25 14:16:10 +08:00
src refactor: adapter 移动到 src 目录 2023-03-24 20:15:51 +08:00
test/helpers chore: 初始化 2023-03-23 20:09:00 +08:00
.commitlintrc.cjs build: 新增构建脚本 build:zip 2023-03-24 19:41:17 +08:00
.editorconfig chore: 初始化 2023-03-23 20:09:00 +08:00
.eslintignore ci: 新增 docs 自动部署脚本 2023-03-25 14:16:10 +08:00
.eslintrc.json chore: 初始化 2023-03-23 20:09:00 +08:00
.gitignore docs: 初始化 docs 2023-03-24 22:35:58 +08:00
.nvmrc chore: 初始化 2023-03-23 20:09:00 +08:00
.prettierrc.json chore: 初始化 2023-03-23 20:09:00 +08:00
CHANGELOG.md ci: 新增自动 changelog 2023-03-24 21:45:00 +08:00
LICENSE chore: 初始化 2023-03-23 20:09:00 +08:00
README.md docs: 新增健全文档 2023-03-25 16:22:01 +08:00
global.d.ts build: 新增构建脚本 build:zip 2023-03-24 19:41:17 +08:00
netlify.toml ci: 新增 docs 自动部署脚本 2023-03-25 14:16:10 +08:00
package.json ci: 新增 docs 自动部署脚本 2023-03-25 14:16:10 +08:00
pnpm-lock.yaml ci: 新增 docs 自动部署脚本 2023-03-25 14:16:10 +08:00
pnpm-workspace.yaml docs: 初始化 docs 2023-03-24 22:35:58 +08:00
rollup.config.js ci: 新增 docs 自动部署脚本 2023-03-25 14:16:10 +08:00
tsconfig.json build: 新增构建脚本 build:zip 2023-03-24 19:41:17 +08:00
vitest.config.ts ci: 新增 ci 流程配置 2023-03-23 21:32:18 +08:00

README.md

axios-miniprogram

npm version License: MIT

中文文档

安装

$ yarn add axios-miniprogram

或者

$ npm i axios-miniprogram

简介

为小程序平台量身定制的轻量级请求库,请求配置以微信小程序作为标准,其他平台兼容实现。

  • 支持 微信小程序、支付宝小程序、百度小程序、字节跳动小程序、QQ 小程序、uniapp。
  • 支持 Typescript,健全的类型系统,智能的 IDE 提示。
  • 支持 Promise
  • 支持 拦截器。
  • 支持 取消请求。
  • 支持 自定义合法状态码。
  • 支持 自定义参数序列化。
  • 支持 自定义转换数据。
  • 支持 自定义错误处理。
  • 支持 自定义平台适配器