在 Postman 中,我成功调用了对 API 的请求。当我fetch()在 ReactJS 中尝试使用它时,它会返回一个Internal Server Error (500)我的 Fetch 看起来像:const FetchData = async (url , request) => { return await fetch(url, request) .then(async function(res) { if (res.ok) console.log("OK: " + await res.json()) else console.log("NOT OK: " + await res.text()) });}要求:{ method: "POST", headers: { 'Content-Type': 'application/json', 'Accept': 'application/json' }, body: { ... }}邮递员>身体:{ "value": { "RequestType":1, "Dependencies":[], "Priority":1, "RequestLocation":"some string", "RequestJSON": "some string", "NoCache":true, "PostNow":true, "Authentication": { "Email":"string", "Device": { "Name":"string", "UniqueDeviceId":"string", "AppVersion":"string", "AppType":int, "Devicestatus":int } } }}我 100% 确定两个身体彼此相等。我无法找出问题所在。你们看到了吗?
添加回答
举报
0/150
提交
取消