This library provides your program functions to access WWW documents via HTTP, Hyper Text Transfer Protocol version 1.1. For details of HTTP, refer [RFC2616] (http://www.ietf.org/rfc/rfc2616.txt).
In this first example, we're retrieving a document from the web server.
require 'net/http'
Net::HTTP.start('www.example.com', 80) {|http|
response = http.get('/index.html')
puts response.body
}