Created
February 22, 2018 16:51
-
-
Save deadlysyn/1218980580092d6469990bf41f70060a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// 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