Skip to content

Instantly share code, notes, and snippets.

@ericviana
Created August 3, 2022 17:53
Show Gist options
  • Save ericviana/c194ef8a67afdd7db3eb1d67d62f79c2 to your computer and use it in GitHub Desktop.
Save ericviana/c194ef8a67afdd7db3eb1d67d62f79c2 to your computer and use it in GitHub Desktop.
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