Last active
June 12, 2017 14:27
-
-
Save patarkf/eeb1c796a58b10576f019c1b5e4553da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function makeRequest() { | |
try { | |
fetch('foo') | |
.then(response => { | |
const result = JSON.parse(response); | |
console.log(result); | |
}) | |
.catch(error => { | |
console.log(error); | |
}); | |
} catch (error) { | |
console.log(error); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment