Last active
August 29, 2015 14:02
-
-
Save airsoull/c2ded1972703879f277f to your computer and use it in GitHub Desktop.
Read json api with token python
This file contains hidden or 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
# pip install requests | |
import requests | |
endpoint = 'www.example.com/api/' | |
headers = {'Authorization': 'Token 86c565fbc8a108386905e9861503652f1b1f616d'} | |
response = requests.get(endpoint, headers=headers) | |
print response.json() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment