Using this simple snippet:
fetch("https://www.youtube.com/feeds/videos.xml?channel_id=UCAL3JXZSzSm8AlZyD3nQdBA", { mode: "no-cors" }) .then(r => { console.debug(r); r.text().then(t => console.debug(t)).catch(console.error); }) .catch(console.error); I receive an empty response (null body, empty url, status of zero, ok is false), however when I go to the Network tab, I can see the data in the Response tab within it. I expect fetch response to give me the same.
What gives? I've tried adding credentials: "include" but it didn't make a difference and shouldn't, this resource should be accessible without it.
{mode: 'no-cors'}you'll see the CORS error - read what mode no-cors actually means hereGETit?