Permalink
Switch branches/tags
Nothing to show
Find file
ed75588 Jan 7, 2010
August Lilleaas Adding all.
14 lines (10 sloc) 285 Bytes
require "net/http"
require "uri"
uri = URI.parse("http://google.com/")
# Shortcut
response = Net::HTTP.get_response(uri)
# Will print response.body
Net::HTTP.get_print(uri)
# Full
http = Net::HTTP.new(uri.host, uri.port)
response = http.request(Net::HTTP::Get.new(uri.request_uri))