Skip to content

Instantly share code, notes, and snippets.

@meadhikari
Last active December 23, 2015 14:59
Show Gist options
  • Save meadhikari/6652072 to your computer and use it in GitHub Desktop.
Save meadhikari/6652072 to your computer and use it in GitHub Desktop.
#curl works fine
#$ curl -d "text=great" http://text-processing.com/api/sentiment/
#returns json
#python is not working
import requests
payload = {"text":"great"}
r = requests.post("http://text-processing.com/api/sentiment/", params=payload)
print r.text
#the above print returns
#Form Validation Errors
#text: This field is required.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment