newfuture / miniprogram-network Goto Github PK
View Code? Open in Web Editor NEWRedefine the Network API of Wechat MiniProgram (小程序网络库)
Home Page: https://miniprogram-network.newfuture.cc
License: Apache License 2.0
Redefine the Network API of Wechat MiniProgram (小程序网络库)
Home Page: https://miniprogram-network.newfuture.cc
License: Apache License 2.0
Unhandled promise rejection TypeError: Cannot read property 'request' of undefined
get(action, data, config) {
return this.request('GET', action, data, config);
}
Path 参数类型增强
根据最新的wx.request文档,
新增enableHttp2、enableQuic、enableHttpDNS等配置
离线时暂停,恢复网络时恢复
wx.onNetworkStatusChange
🚨 You need to enable Continuous Integration on Greenkeeper branches of this repository. 🚨
To enable Greenkeeper, you need to make sure that a commit status is reported on all branches. This is required by Greenkeeper because it uses your CI build statuses to figure out when to notify you about breaking changes.
Since we didn’t receive a CI status on the greenkeeper/initial
branch, it’s possible that you don’t have CI set up yet. We recommend using Travis CI, but Greenkeeper will work with every other CI service as well.
If you have already set up a CI for this repository, you might need to check how it’s configured. Make sure it is set to run on all new branches. If you don’t want it to run on absolutely every branch, you can whitelist branches starting with greenkeeper/
.
Once you have installed and configured CI on this repository correctly, you’ll need to re-trigger Greenkeeper’s initial pull request. To do this, please click the 'fix repo' button on account.greenkeeper.io.
超时返回的数据 { errMsg: "request:fail " }, fail 后面多了个空格, 费了点眼力才看出来 :(
能否提供一下全局拦截的例子?
每个请求允许自定义超时
miniprogram-network如何打包为单文件,请老师指点一下,然后直接在项目中使用单文件,不使用npm i miniprogram-network安装
rt
DDNS库怎么没了。 大佬!
cacheGet
操作失败,重试操作不执行。
const {
request
} = require('miniprogram-network');
request({
url: Api.queryConfigurationStatus,
data: params,
method: "POST",
success: function (res) {
//回调不走
}
})
请求能够成功发出,但是回调success
不进,fail
和complate
也不进,
换成wx.request
立马就好了,
这是不兼容wx.request
的api
吗?
新版本小程序网络API自带排队机制
timeout
into lifecycletimestamp
into lifecycleonProgressUpdate
into lifecycleonHeadersReceived
into lifecycleminiprogram-request
miniprogram-downloader
miniprogram-uploader
支持开启token 无感知刷新之类的
场景,dns解析在某区域故障,retry失败后尝试切换
感觉以后会火
https://developers.weixin.qq.com/miniprogram/dev/api/wx.uploadFile.html
wx.uploadFile
不会进行反序列化, (与 wx.request
不同)
在框架中进行自动处理
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.