Skip to content

Instantly share code, notes, and snippets.

@ewalk153
Created April 8, 2013 16:39
Show Gist options
  • Save ewalk153/5338284 to your computer and use it in GitHub Desktop.
Save ewalk153/5338284 to your computer and use it in GitHub Desktop.
Https example...
require 'net/http'
require 'net/https'
class Woot
def foo
uri = URI.parse("https://www.google.fr/?q=example")
https = Net::HTTP.new(uri.host,uri.port)
https.use_ssl = true
req = Net::HTTP::Get.new(uri.path)
res = https.request(req)
puts res.body
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment