Created
May 26, 2022 20:02
-
-
Save DanielSCustodio/102549738e399dfc677b4d25bfee58ae to your computer and use it in GitHub Desktop.
Requisição simples à API usando async/await
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
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