https://blog.csdn.net/yuhui123999/article/details/60572888
https://blog.csdn.net/yuhui123999/article/details/60572888
https://blog.csdn.net/yuhui123999/article/details/60572888
微信小程序中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错误













