Intro-to-Data-APIs-JS icon indicating copy to clipboard operation
Intro-to-Data-APIs-JS copied to clipboard

video 1.1 fetch() notes

Open shiffman opened this issue 6 years ago • 1 comments

Filing some notes in case I want to record an extra video to go in between 1.1 and 1.2.

  • mentioning try/catch as error handling option next step
  • pointing out that this is just to demo fetch() of course just say <img src="rainbow.jpg">
  • Noting that if you use return in getData() it’ll come back in the promise as response.

shiffman avatar May 13 '19 02:05 shiffman

Also noting from @joeyklee (and this came in via YouTube comments as well)

  • Since fetch() returns a promise either way is fine, but maybe future examples could introduce the try/catch block?

shiffman avatar May 19 '19 13:05 shiffman