Skip to content

Instantly share code, notes, and snippets.

@crazed
Created August 7, 2012 16:20
Show Gist options
  • Save crazed/3286913 to your computer and use it in GitHub Desktop.
Save crazed/3286913 to your computer and use it in GitHub Desktop.
require 'net/https'
uri = URI.parse("https://blah.com/test")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true if uri.scheme == 'https'
request = Net::HTTP::Get.new(uri.path)
results = http.request(request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment