微信小程序的 fetch 接口实现
npm install wxapp-fetch --save
import wxFetch from "wxapp-http";
wxFetch("https://www.google.com")
.then(function(res) {
return res.json();
})
.then(data => {
console.info(data);
})
.catch(err => {
console.error(err);
console.error(err.json());
});
wxapp-http 微信小程序的 http 模块,Tiny but Powerful
wxapp-XMLHttpRequest Web XMLHttpRequest implement for WeChat APP
wxapp-r2 r2 implement in Wechat App client
git clone https://github.com/axetroy/wxapp-fetch.git
cd ./wxapp-fetch
yarn
yarn start
欢迎 PR.
You can flow Contribute Guide
Axetroy💻 🔌 ⚠️ 🐛 🎨 |
---|
The MIT License