Created
June 26, 2018 16:03
-
-
Save inawrath/848df41eca2026855a66584581dc5a6d to your computer and use it in GitHub Desktop.
Multiple request axios
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('http://google.com'), | |
axios.get('http://apple.com') | |
]) | |
.then(axios.spread((googleRes, appleRes) => { | |
// do something with both responses | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment