Skip to content

Instantly share code, notes, and snippets.

@Gaafar
Created March 16, 2017 17:58
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save Gaafar/65db187a0a7131d2499f3531c5614a33 to your computer and use it in GitHub Desktop.
Save Gaafar/65db187a0a7131d2499f3531c5614a33 to your computer and use it in GitHub Desktop.
const makeRequest = async () => {
try {
// this parse may fail
const data = JSON.parse(await getJSON())
console.log(data)
} catch (err) {
console.log(err)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment