0.0.3 • Published 5 years ago

wx-promisify-request v0.0.3

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

wechat mini program promisify request

How to use it

import request 'wx-promisify-request';

const r = request();
const url = 'https:xxxx.com';
// then you can use it like below
r.get(url);

// https://developers.weixin.qq.com/miniprogram/dev/api/wx.request.html
r.post(url, {
    text: 'data', // except the below three fields, all others fields are data will sent to backend, check above link's doc
    header, //  options
    dataType, // options
    responseType // options
});
r.delete(url);
r.put(url);
r.head(url);
r.options(url)