Created
April 23, 2021 02:40
-
-
Save csszen/328203a4c525cd721a13d70aa86d736f 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
// node | |
fetch('https://api.github.com/rate_limit', {headers: {Authorization: 'Basic ' + Buffer.from(`csszen:${process.env.GIST_TOKEN}`).toString('base64')}}).then(r => r.json).then(console.log) | |
// browser | |
fetch('https://api.github.com/rate_limit', {headers: {Authorization: 'Basic ' + btoa(`csszen:${token}`)}}).then(r => r.json()).then(console.log) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment