-1
fetch()API不发布此JSON正文。fetch()不是发布JSON正文
var j = {
"addressee": "James"
};
return fetch('http://requestb.in/blahblahblah', {
method: 'POST',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Cache-Control': 'no-cache'
},
body: JSON.stringify(j)
})
在RequestBin中绝对没有请求正文出现。身体会发生什么?调试JSON.stringify(j)
显示它确实正确格式化正文。
请求是否显示在浏览器开发人员工具的“网络”窗格中? –