Skip to content

Instantly share code, notes, and snippets.

@sharvell
Created April 5, 2013 05:31
Show Gist options
  • Select an option

  • Save sharvell/5316872 to your computer and use it in GitHub Desktop.

Select an option

Save sharvell/5316872 to your computer and use it in GitHub Desktop.
Python simple HTTP Post
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