Skip to content

Instantly share code, notes, and snippets.

/demo.py Secret

Created October 23, 2014 18:39
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/a7805991ed762067568c to your computer and use it in GitHub Desktop.
Save anonymous/a7805991ed762067568c to your computer and use it in GitHub Desktop.
Demo
import requests
import json
url = 'http://0.0.0.0:8000/api/v1/feedback/'
payload = {"happy": True, "product":"Firefox for Android", "description":"OMG! I love Firefox!"}
headers = {'content-type': 'application/json'}
r = requests.post(url,data=json.dumps(payload), headers=headers)
print r.status_code
print r.content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment