Created
August 3, 2022 17:53
-
-
Save ericviana/c194ef8a67afdd7db3eb1d67d62f79c2 to your computer and use it in GitHub Desktop.
This file contains 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
import axios from 'axios' | |
async function fetchRepos () { | |
try { | |
const user = await axios.get('https://api.github.com/users/ericviana') | |
const repos = await axios.get(user.data.repos_url) | |
console.log(repos) | |
} catch (e) { | |
console.log(e) | |
} | |
} | |
fetchRepos(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment