Friday, February 18, 2011

Ruby: HTTP Request


require 'net/http'
req = Net::HTTP.get_response(URI.parse('http://www.juretta.com/'))
print req.body
require 'open-uri'
open("http://www.juretta.com/") {|f|
print f.read
}

No comments:

Post a Comment