I hope to parse data from a public endpoint: https://feeds.citibikenyc.com/stations/stations.json
Went I visit this URL, it populates data. When attempt to fetch in jsfiddle, I get a 200 "OK" status, but no data.
fetch("https://feeds.citibikenyc.com/stations/stations.json", { mode: "no-cors" })
.then(response => {
if (response.ok) {
response.json().then(data => {
console.log(data);
});
} else console.log('Error');
})
.catch(error =>
console.log(error)
);
https://jsfiddle.net/o60k1wgb/
I don't appear to getting errors from the endpoint, so perhaps my fetch code is incorrect?