Last active
April 7, 2019 22:31
-
-
Save simonschwartz/3c3e9bcc14b587a841ec4b543f575d05 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
const getNodeRepoDetails = () => | |
fetch('https://api.github.com/repos/nodejs/node').then(response => response.json()); | |
const getGoRepoDetails = () => | |
fetch('https://api.github.com/repos/golang/go').then(response => response.json()); | |
Promise.all([getNodeRepoDetails(), getGoRepoDetails()]) | |
.then(response => { | |
const [ nodeResponse, goResponse ] = response; | |
/* handle request response */ | |
}) | |
.catch(error => { /* handle request error */ }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment