Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axetroy/wxapp-fetch
fetch API implement for WeChat App
https://github.com/axetroy/wxapp-fetch
Last synced: 16 days ago
JSON representation
fetch API implement for WeChat App
- Host: GitHub
- URL: https://github.com/axetroy/wxapp-fetch
- Owner: axetroy
- License: mit
- Created: 2017-06-28T03:03:28.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-08T12:56:34.000Z (over 5 years ago)
- Last Synced: 2024-10-11T20:13:53.473Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 152 KB
- Stars: 12
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- License: LICENSE
Awesome Lists containing this project
README
# wxapp-fetch
[![Build Status](https://travis-ci.org/axetroy/wxapp-fetch.svg?branch=master)](https://travis-ci.org/axetroy/wxapp-fetch)
[![Dependency](https://david-dm.org/axetroy/wxapp-fetch.svg)](https://david-dm.org/axetroy/wxapp-fetch)
![License](https://img.shields.io/badge/license-MIT-green.svg)
[![Prettier](https://img.shields.io/badge/Code%20Style-Prettier-green.svg)](https://github.com/prettier/prettier)
![Node](https://img.shields.io/badge/node-%3E=6.0-blue.svg?style=flat-square)
[![npm version](https://badge.fury.io/js/wxapp-fetch.svg)](https://badge.fury.io/js/wxapp-fetch)微信小程序的 fetch 接口实现
## Features
- [x] 队列化请求,规避最高并发数量 5 个的限制
## Installation
```bash
npm install wxapp-fetch --save
```[example](https://github.com/axetroy/wxapp-fetch/tree/master/example)
## Usage
```javascript
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](https://github.com/axetroy/wxapp-http) 微信小程序的 http 模块,Tiny but Powerful
[wxapp-XMLHttpRequest](https://github.com/axetroy/wxapp-XMLHttpRequest) Web XMLHttpRequest implement for WeChat APP
[wxapp-r2](https://github.com/axetroy/wxapp-r2) r2 implement in Wechat App client
## Contributing
```bash
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](https://github.com/axetroy/wxapp-fetch/blob/master/contributing.md)
## Contributors
| [
Axetroy](http://axetroy.github.io)
[💻](https://github.com/gpmer/gpm.js/commits?author=axetroy) 🔌 [⚠️](https://github.com/gpmer/gpm.js/commits?author=axetroy) [🐛](https://github.com/gpmer/gpm.js/issues?q=author%3Aaxetroy) 🎨 |
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |## License
The [MIT License](https://github.com/axetroy/wxapp-fetch/blob/master/LICENSE)