Skip to content

Instantly share code, notes, and snippets.

@andrewpetrochenkov
Created August 24, 2024 19:49
Show Gist options
  • Save andrewpetrochenkov/382a040f9b40ca1064269967905735f7 to your computer and use it in GitHub Desktop.
Save andrewpetrochenkov/382a040f9b40ca1064269967905735f7 to your computer and use it in GitHub Desktop.
github api headers #github
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