Created
November 16, 2018 23:18
-
-
Save justsml/fca7cd72ec1ebc07d994eac13a665ddf 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
fetch('https://api.github.com/orgs/nodejs', { | |
headers: new Headers({ | |
'User-agent': 'Mozilla/4.0 Custom User Agent' | |
}) | |
}) | |
.then(response => response.json()) | |
.then(data => { | |
console.log(data) | |
}) | |
.catch(error => console.error(error)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment