Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fetch('http://example.com')
- .then(response => response.json())
- .then((result) => {
- // use result...
- })
- .catch((error) => {
- // do something with the error
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement