Created
April 5, 2013 05:31
-
-
Save sharvell/5316872 to your computer and use it in GitHub Desktop.
Python simple HTTP Post
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
| def http_post(host, selector, body): | |
| h = httplib.HTTPConnection(host) | |
| h.request('POST', selector, body) | |
| res = h.getresponse() | |
| return res.status, res.reason, res.read() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment