Urban Nilsson wrote:
> I tried the following example code:
> 
> require 'net/http'
> h = Net::HTTP.new('www.pragmaticprogrammer.com', 80)
> resp, data = h.get('/index.html', nil)
> puts "Code = #{resp.code}"
> puts "Message = #{resp.message}"
> resp.each {|val, key| printf "%-14s = %-40.40s\n", key, val }
> p data[0..55]

net::HTTP in 1.8 is (unfortunately) incompatible with previous versions.
It now returns a single object, with the response contents accessible 
via the method 'body.
try

    resp = h.get(...)
    p resp.body[0..55]



Cheers



Dave