Skip to content

Instantly share code, notes, and snippets.

@DanielSCustodio
Created May 26, 2022 20:02
Show Gist options
  • Save DanielSCustodio/102549738e399dfc677b4d25bfee58ae to your computer and use it in GitHub Desktop.
Save DanielSCustodio/102549738e399dfc677b4d25bfee58ae to your computer and use it in GitHub Desktop.
Requisição simples à API usando async/await
const requestApi = async () => {
const responseRaw = await fetch('https://api.github.com/users/diego3g');
const responseJson = await responseRaw.json();
return responseJson;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment