Error of CORS if we use mode:"no-cors" than nothing happens
Code :
fetch(
"http://url")
.then(function (response) {
if (!response.ok) {
throw new Error("HTTP error, status = " + response.status);
}
return response.json();
})
.then(function (json) {
console.log(json);
})
.catch(function (error) {
console.log("Error: " + error.message);
});