Last active
June 12, 2017 14:28
-
-
Save patarkf/bdfc63bdd3ec42ff696ab63547046b92 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
async function getFromGitHub() { | |
try { | |
const userName = 'patarkf'; | |
const url = 'https://api.github.com/users'; | |
const reposResponse = await fetch(`${url}/${userName}/repos`); | |
const userRepos = await reposResponse.json(); | |
console.log(userRepos); | |
} catch (error) { | |
console.log(error); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment