小程序能否对本地服务器发起HTTPs Request?
本文介绍了小程序能否对本地服务器发起HTTPs Request?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
问 题
能否对https://localhost/test.php发起请求?
在本地做测试。
......................补充...........................................
wx.request({
url : 'https://localhost/test/1.php',
data : {},
success : function(res){
console.log('ok');
},
fail : function(res){
console.log('error');
}
})
https://localhost/test.php能在浏览器中访问。
解决方案
对于发起本地请求,不能设置Appid
这篇关于小程序能否对本地服务器发起HTTPs Request?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文