Skip to content

Instantly share code, notes, and snippets.

@axiak
Created October 10, 2012 05:14
Show Gist options
  • Save axiak/3863293 to your computer and use it in GitHub Desktop.
Save axiak/3863293 to your computer and use it in GitHub Desktop.
require "rubygems"
require "net/https"
require "json"
require "uri"
require "pp"
request_url = "https://api.hubapi.com/contacts/v1/lists/all/contacts/all?hapikey=demo"
url = URI.parse(request_url)
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(url.request_uri)
response = http.request(request)
pp JSON.parse(response.body)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment