From some days ago fetch function in my code keeps returning the data from a url which I already changed in the request. I returns always same data and error “Already read” irrespectivelly of which url I put in. Here’s the code:
var Observable = require(“FuseJS/Observable”); var dataE = Observable();
fetch(‘http://www.mydomain.com/api/get_category_posts/?category_id=40’) .then(function(response) { console.log("Events: "+JSON.stringify(response.json())); return response.json();}) .then(function(responseObject) { dataE.value = responseObject;}) .catch(function(err) { console.log(“it’s an Error @ events”); console.log(err.message); });
Why could this strange behaviour be???.. How do I trace the problem?