【发布时间】:2021-08-30 13:21:42
【问题描述】:
这是我的代码:
return fetch("https://www.motiondevelopment.top/api/v1.2/bots/" + botid + "/stats", {
method: "post",
headers: {
"Content-Type": "application/json",
"key": apikey,
},
body: { "guilds": serverNumber }
}).then((response) => {
return response.json().then((data) => {
return data;
}).catch((err) => {
console.log("[MotionBotList]: " + err);
})
});
目前它不会使用内容类型 application/json ,我不知道为什么。有人可以帮忙吗?
【问题讨论】:
标签: node.js node-fetch