微信小程序发起请求失败的解决方法
微信小程序中wx.request是发起的是HTTPS 请求,其method有两种方法:get和post。
method为get时,header必须为:
header: { 'content-type': 'application/json' },
method为post时,header必须为:
header: { 'content-type': 'application/x-www-form-urlencoded' },如果header错误会导致后台得不到数据而报NullPointerException错误
小程序
TAG标签: 微信小程序微信通过验证发送失败
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

