Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created June 28, 2019 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/cdaa4b7991f708b76b4b6d6f4dba8827 to your computer and use it in GitHub Desktop.
Save parzibyte/cdaa4b7991f708b76b4b6d6f4dba8827 to your computer and use it in GitHub Desktop.
async function obtenerJsonConAsync() {
try {
let respuesta = await fetch("https://httpbin.org/json")
let json = await respuesta.json();
return json;
} catch (e) {
console.log("Error: ", e)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment