Skip to content

Instantly share code, notes, and snippets.

@justsml
Created November 16, 2018 23:18
Show Gist options
  • Save justsml/fca7cd72ec1ebc07d994eac13a665ddf to your computer and use it in GitHub Desktop.
Save justsml/fca7cd72ec1ebc07d994eac13a665ddf to your computer and use it in GitHub Desktop.
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