Created
November 16, 2011 15:06
-
-
Save bshelton229/1370276 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
# 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