Snippets Collections
const token = 'YOUR_TOKEN_HERE';
fetch('https://api.github.com/user/repos', {
  headers: {
    Authorization: `token ${token}`
  }
})
  .then(res => res.json())
  .then(json => console.log(json));
star

Wed Jan 26 2022 02:27:03 GMT+0000 (UTC)

#javascript #json #auth #fetch

Save snippets that work with our extensions

Available in the Chrome Web Store Get Firefox Add-on Get VS Code extension