Skip to content

Instantly share code, notes, and snippets.

@jorgeacortes
Last active July 27, 2020 17:53
Show Gist options
  • Save jorgeacortes/164e931f786f6825f39f5cda92060771 to your computer and use it in GitHub Desktop.
Save jorgeacortes/164e931f786f6825f39f5cda92060771 to your computer and use it in GitHub Desktop.
Example of a get request to Github api using python with autentication
import requests
headers = {'Authorization': 'token xxxxx'}
action = "jorgeacortes/stm32-cmake-docker/traffic/clones"
resp = requests.get('https://api.github.com/repos/'+ action, headers=headers)
print(resp.json())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment