daily pastebin goal
6%
SHARE
TWEET

Untitled

a guest Jun 19th, 2018 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top