Created
May 14, 2018 23:35
-
-
Save fhott/75fa0eb791a4f20a69980d6e5d8131de to your computer and use it in GitHub Desktop.
This file contains 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 getGoogleRepos = () => { | |
fetch('https://api.github.com/users/google/repos?page=13&per_page=100', { | |
method: 'GET', | |
mode: 'cors' | |
}) | |
.then(response => response.json()) | |
.then(data => console.log(data)) | |
.catch(err => console.log(err)) | |
} | |
const getFacebookRepos = () => { | |
fetch('https://api.github.com/users/facebook/repos?page=2&per_page=100', { | |
method: 'GET', | |
mode: 'cors' | |
}) | |
.then(response => response.json()) | |
.then(data => console.log(data)) | |
.catch(err => console.log(err)) | |
} | |
getGoogleRepos() | |
getFacebookRepos() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment