Skip to content

Instantly share code, notes, and snippets.

@deadlysyn
Created February 22, 2018 16:51
Show Gist options
  • Save deadlysyn/1218980580092d6469990bf41f70060a to your computer and use it in GitHub Desktop.
Save deadlysyn/1218980580092d6469990bf41f70060a to your computer and use it in GitHub Desktop.
// Community example of multiple requests with Axios...
function A() {
return axios.get(API + '/A');
}
function B() {
return axios.get(API + '/B');
}
axios.all([A(), B()])
.then(axios.spread(function (a, b) {
// Safely use a and b!
}));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment