request的header的contentType的问题?

发布于 7 年前作者 moqiang11994 次浏览最后编辑 7 年前来自 issues

request的header的contentType设置为application/json是不是就没办法自定义header里携带的参数。我设置为application/json就就没办法带token了

1 回复
chao58
chao581 楼5 年前

let header=new Object();

header[“content-type”]=“application/json”;

header[“token”]=“xxx”;

wx.request({

header:header

})

这样试试?