Created
December 21, 2010 04:58
-
-
Save bulkan/749515 to your computer and use it in GitHub Desktop.
This file contains 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 httplib2 | |
import json | |
h = httplib2.Http() | |
h.add_credentials('user1', 'user1') | |
json_str = json.dumps({'name':"joe blows"}) | |
response, content = h.request("http://example.com/rest", method="POST", body=json_str, headers={'content-type':'application/json'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment