Skip to content

Instantly share code, notes, and snippets.

@kutyel
Last active July 5, 2018 07:34
Show Gist options
  • Save kutyel/4b5c89f05adfaed7869ac4b3790e4082 to your computer and use it in GitHub Desktop.
Save kutyel/4b5c89f05adfaed7869ac4b3790e4082 to your computer and use it in GitHub Desktop.
fetch('http://example/endpoint')
.then(data => data.json()) // todo bien, todo correcto...
.catch(err => console.error(err)) // oh oh...
.finally(() => console.log('...y yo que me alegro!')) // <-- lo nuevo 😎
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment