为了账号安全,请及时绑定邮箱和手机立即绑定

微信小程序wx.request的header疑问

微信小程序wx.request的header疑问

ibeautiful 2019-02-15 10:15:57
我自己测试微信小程序的wx.request功能。header设置 'Content-Type': 'json' 能获取到结果wx.request({  url: 'https://api.douban.com/v2/movie/in_theaters',  method: 'GET',  header: {    'Content-Type': 'json' // 使用这个能正常获取数据  },  success: function(res) {    console.log(res);  }})header设置 'Content-Type': 'application/json' 不能获取结果wx.request({  url: 'https://api.douban.com/v2/movie/in_theaters',  method: 'GET',  header: {    'Content-Type': 'application/json'// 使用这个不能获取数据  },  success: function(res) {    console.log(res);  }})这两种写法到底有什么不同?为什么会导致这种问题产生?'Content-Type': 'json''Content-Type': 'application/json'
查看完整描述

1 回答

?
呼如林

TA贡献1798条经验 获得超3个赞

这里有同样问题的。
链接描述

查看完整回答
反对 回复 2019-02-19
  • 1 回答
  • 0 关注
  • 2624 浏览
慕课专栏
更多

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号