Skip to content

axetroy/wxapp-fetch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

9280335 · Mar 2, 2019

History

14 Commits
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Jul 2, 2017
Mar 2, 2019
Jul 2, 2017
Oct 20, 2017
Mar 2, 2019
Jul 2, 2017
Oct 20, 2017

Repository files navigation

wxapp-fetch

Build Status Dependency License Prettier Node npm version

微信小程序的 fetch 接口实现

Features

  • 队列化请求,规避最高并发数量 5 个的限制

Installation

npm install wxapp-fetch --save

example

Usage

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());
  });

Related

wxapp-http 微信小程序的 http 模块,Tiny but Powerful

wxapp-XMLHttpRequest Web XMLHttpRequest implement for WeChat APP

wxapp-r2 r2 implement in Wechat App client

Contributing

git clone https://github.com/axetroy/wxapp-fetch.git
cd ./wxapp-fetch
yarn
yarn start
  1. 打开微信 web 开发者工具, 加载 wxapp-http/example 目录
  2. 修改 index.js

欢迎 PR.

You can flow Contribute Guide

Contributors


Axetroy

💻 🔌 ⚠️ 🐛 🎨

License

The MIT License