总结一下请求问题
1:域名配置
2:问度娘,400的问题主要是由’Content-Type’的值导致的,有两种解决办法
a:‘Content-Type’: ‘application/text’
b:“Content-Type”: “json”
可惜对我来说都不管用,后来看到有这么写的
c: ‘Content-Type’: ‘application/json;charset=UTF-8;’
依然不管用啊
自己琢磨了下
d:‘Content-Type’: ‘json;charset=UTF-8;’
成功。
3.另外是header: 不是headers:!