Skip to content

Instantly share code, notes, and snippets.

@dladowitz
Last active August 29, 2015 14:17
Show Gist options
  • Save dladowitz/262dbea2f9705283955a to your computer and use it in GitHub Desktop.
Save dladowitz/262dbea2f9705283955a to your computer and use it in GitHub Desktop.
require 'json'
uri = URI.parse("https://api.admoda.com/v1/advertiser/stats/campaigns.csv?date=2015-03-11")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE # read into this
headers = {'Authorization' => 'Token a3446590e8920e90e857f20c3d24479c'}
response = http.get(uri.request_uri, headers)
p "----Response----"
puts response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment