Created
April 2, 2015 22:33
-
-
Save anonymous/2a9a627da19131051388 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'curl' | |
auth_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
date_header = 'Thu, 02 Apr 2015 07:51:57 GMT' | |
url = 'http://XXXXXXXXX.com/api/XXXXX/YYYYY/command' | |
data = '{"d":"887788","g":0}' | |
c = Curl::Easy.http_put(url, data) do |curl| | |
curl.headers['User-Agent'] = 'curl/7.35.0' | |
curl.headers['Authorization'] = "OHSC " + auth_token | |
curl.headers['Content-Type'] = 'application/json' | |
curl.headers['Date'] = date_header | |
curl.verbose = true | |
end | |
puts c.body_str | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment