按照官方文档,我们客户端发起post请求的代码如下:
t:function() {
wx.request({
url: url,
data: {"text":"123"
},
method: 'POST',
success: function(res){
console.log(JSON.stringify(res));
}
})
},
然后一直报错
这时候你加上header: {"Content-Type":"application/x-www-form-urlencoded"},就不报错了