Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
require 'rubygems'
require 'rest_client'
values = {
"text" => 'The food was great, but the service was slow.',
"categories" => 1,
"sentiment" => 1,
"annotate"=> 0
}
headers = {
"content_type" => "application/json; charset=utf_8",
"<ACCESS-KEY-HEADER>" => "<ACCESS-KEY>"
}
url = "<ACCESS-URL>"
response = RestClient.post url, values, headers
puts response
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment