Skip to content

Instantly share code, notes, and snippets.

@inawrath
Created June 26, 2018 16:03
Show Gist options
  • Save inawrath/848df41eca2026855a66584581dc5a6d to your computer and use it in GitHub Desktop.
Save inawrath/848df41eca2026855a66584581dc5a6d to your computer and use it in GitHub Desktop.
Multiple request axios
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