Created
January 7, 2016 13:49
-
-
Save danleyb2/0640044a8cd67e2ff6e4 to your computer and use it in GitHub Desktop.
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
import requests | |
import json | |
url = 'https://api.github.com/some/endpoint' | |
payload = {'some': 'data'} | |
# Create your header as required | |
headers = {"content-type": "application/json", "Authorization": "<auth-key>" } | |
r = requests.put(url, data=json.dumps(payload), headers=headers) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment