Guest User

Untitled

a guest
Jun 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. axios.all([
  2. axios.get('/comments'),
  3. axios.get('/images')
  4. ])
  5. .then(axios.spread((comments, images) => {
  6. // do something with both responses
  7. });
  8.  
  9. axios.get('/images')
  10. .then((images) => {
  11. // do something with images
  12. });
  13.  
  14. axios.get('/comments')
  15. .then((comments) => {
  16. // do something with comments
  17. });
Add Comment
Please, Sign In to add comment