Created
October 26, 2020 20:55
-
-
Save allangrds/aa2c1bc52ac8860dca289e010257db89 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
axios.all([ | |
axios.get('https://api.github.com/users/iliakan'), | |
axios.get('https://api.github.com/users/taylorotwell') | |
]) | |
.then(axios.spread((obj1, obj2) => { | |
// Ambas requests foram finalizadas | |
console.log(obj1.data.login + ' has ' + obj1.data.public_repos + ' public repos on GitHub'); | |
console.log(obj2.data.login + ' has ' + obj2.data.public_repos + ' public repos on GitHub'); | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment