Advertisement
edwinjackson

Untitled

Jun 26th, 2019
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. fetch('http://example.com')
  2.     .then(response => response.json())
  3.     .then((result) => {
  4.         // use result...
  5.     })
  6.     .catch((error) => {
  7.        // do something with the error
  8.     })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement