@jeebey/wx-request
v1.0.7
Published
将wx.request转成Promise方式
Downloads
17
Readme
介绍
将wx.request转成Promise方式
安装
npm i @jeebey/wx-request
使用说明
const $httpclient = require('@jeebey/wx-request')
$http = $httpclient.create({host:''})
$http.post(url,{}).then(res=>{})
$http.header({'key':'val'}) //永久覆盖
$http.body(url,{},{'head':'aaa'}) //只限当次请求
$http.cache().post() // 数据可以缓存
$http.abort().post() // 终止上次请求