0๐
โ
If your intention is to get a JSON from the endpoint, you need to get the body as json, try this:
fetch("https://YOUR_LINK", requestOptions)
.then(function(response) {
return response.text();
})
.then(function(data) {
console.log(data);
});
Source:stackexchange.com