Created
August 24, 2024 19:49
-
-
Save andrewpetrochenkov/382a040f9b40ca1064269967905735f7 to your computer and use it in GitHub Desktop.
github api headers #github
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
import os | |
import requests | |
headers = { | |
"Authorization": "Bearer %s" % os.getenv('GITHUB_TOKEN') | |
} | |
r = requests.get("https://api.github.com/",headers=headers) | |
for k,v in r.headers.items(): | |
print('%s: %s' % (k,v)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment