Skip to content

Instantly share code, notes, and snippets.

/sample.py Secret

Created October 23, 2014 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/ae65db6e623038074729 to your computer and use it in GitHub Desktop.
Save anonymous/ae65db6e623038074729 to your computer and use it in GitHub Desktop.
import urllib2,json
url = 'http://0.0.0.0:8000/api/v1/feedback/'
postdata = {"happy": True, "product":"Firefox for Android", "description":"Cool!"}
req = urllib2.Request(url)
req.add_header('Content-Type','application/json')
data = json.dumps(postdata)
response = urllib2.urlopen(req,data)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment