Skip to content

Instantly share code, notes, and snippets.

@sandeepm96
Last active June 7, 2017 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sandeepm96/31fed59107f1808ad55ae7291c2acab5 to your computer and use it in GitHub Desktop.
Save sandeepm96/31fed59107f1808ad55ae7291c2acab5 to your computer and use it in GitHub Desktop.
import json
import requests
response = requests.post('https://api.github.com/user/repos',
data=json.dumps({'name': 'foo'}), auth=('user', 'pass'))
assert response.status_code == 201
print response.json()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment