Skip to content

Instantly share code, notes, and snippets.

@bshelton229
Created November 16, 2011 15:06
Show Gist options
  • Save bshelton229/1370276 to your computer and use it in GitHub Desktop.
Save bshelton229/1370276 to your computer and use it in GitHub Desktop.
# Works in Ruby 1.9.3 even in OSX Lion
require 'cgi'
require 'uri'
require 'net/https'
require 'webrick'
get_url = "https://modolabs-device.appspot.com/api/"
uri = URI.parse(get_url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
request = Net::HTTP::Get.new(uri.request_uri)
response = http.request(request)
puts response.body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment