Skip to content

Instantly share code, notes, and snippets.

@sandeepm96

sandeepm96/rest_client.py

Last active Jun 7, 2017
Embed
What would you like to do?
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