request 发送请求感觉多了个JSON.stringify
发布于 6 年前 作者 SunGg12138 2838 次浏览 来自 问答
var options = {
      method: 'POST',
      url: '***',
      headers: {
        'Content-Type': 'text/plain'
      },
      json: true,
      body: "1798612312"
}

body会变成’“1798612312”’,就像多了个JSON.stringify

3 回复

text/plain导致的吧,换成json试试,不过换成json的话你的body也得换格式

必须要求是text/plain格式的

json: false 啊,你叫他帮你转json了。。。

回到顶部