const result = await fetch(https://example.com', {
method: 'POST',
mode: 'no-cors',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({"username": "Jochan","countFollowers": 60001}),
});
I am trying to send a request to a third-party API, an error arrives, how can I solve it? Error: POST https://example.com net::ERR_ABORTED 500 (Internal Server Error)
you are not authorized to get a response from an API that does not have the appropriate headers set. If it is neither yours API nor public one, you can only try some hacks with CORS proxies from google search
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.