javascript - Trying to use fetch and pass in mode: no-cors - Stack Overflow

PHOTO EMBED

Wed Mar 23 2022 11:11:28 GMT+0000 (UTC)

Saved by @arielvol #javascript

fetch('http://catfacts-api.appspot.com/api/facts?number=99', { mode: 'no-cors'})
  .then(blob => blob.json())
  .then(data => {
    console.table(data);
    return data;
  })
  .catch(e => {
    console.log(e);
    return e;
  });
content_copyCOPY

https://stackoverflow.com/questions/43262121/trying-to-use-fetch-and-pass-in-mode-no-cors