Skip to content

Instantly share code, notes, and snippets.

@joaopaulovieira
Created September 11, 2014 19:03
Show Gist options
  • Save joaopaulovieira/9580fe656ace3e82b78d to your computer and use it in GitHub Desktop.
Save joaopaulovieira/9580fe656ace3e82b78d to your computer and use it in GitHub Desktop.
#!/usr/bin/python
import httplib, urllib, json
params = urllib.urlencode({'GLBID': '1001', 'uri': 'localhost:5008/static/feed.html', 'body': 'teste'})
conn = httplib.HTTPConnection("localhost:5008")
conn.request("POST", "/post/localhost:5008/static/feed.html", params)
response = conn.getresponse()
print response.status, response.reason
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment