0
I created a small project on webstorm with an html that fetch from my localhost:3340
fetch('http://httpbin.org/get')
.then(
function(response){
console.log("response ok");
return response.json();
}
)
.then(function (json){
console.log("json ok");
}
).catch(function(error) {
console.log('ERROR: ' + error.message);
});
I can’t figure out the cause of the mistake "Networkerror when attempting to fetch Resource." appearing on the Firefox console. This message doesn’t help me much because it seems to me genetic.
Firefox is updated in the latest version
Someone could show me a way. As I cannot identify the cause of the problem I cannot study a solution.
I managed the file . har to see if I discovered something and I think this is the answer that I have:
"response":{
**"status":0**,
"statusText":"",
"httpVersion":"",
"headers":[
],
"cookies":[
],
"content":{
"size":0,
"encoding":"base64",
"text":""
},
"redirectURL":"",
"bodySize":-1
}
in advance thank you for the support !
It’s probably a CORS error, look at the browser console that should display an error.
– Pedro Sanção
@Pedrosanção, I wish it was because then I would have at least one way to go, but I can’t determine why the only message that appears on the firefox console is : ERROR: Networkerror when attempting to fetch Resource.
– Phabio Ricard