微信小程序的r2实现
npm install wxapp-r2 --save
// es6
import r2 from 'wxapp-r2';
// commonJS
const r2 = require('wxapp-r2');
async function main(){
const res = await r2('https://api.github.com').json;
console.log(res);
}
wxapp-fetch fetch API implement for WeCHat App
wxapp-http 微信小程序的http模块,Tiny but Powerful
wxapp-XMLHttpRequest Web XMLHttpRequest implement for WeChat APP
git clone https://github.com/axetroy/wxapp-r2.git
cd ./wxapp-r2
yarn
yarn run start
- 打开微信web开发者工具, 加载wxapp-r2/example目录
- 修改index.ts
欢迎PR.
You can flow Contribute Guide
Axetroy 💻 🔌 |
---|
The MIT License