Hi, please post the code that caused the error message.
-Conrad
Hi, please post the code that caused the error message.
-Conrad
Hi, it seems that you have incorrectly spelled the module name. It should be 'Net' instead of 'NET'. In any case, here's an example from "Programming Ruby' which you should have a copy of:
irb(main):001:0> require 'net/http' => true irb(main):002:0> Net::HTTP.start('www.pragmaticprogrammer.com') do |http| irb(main):003:1* response = http.get('/index.html') irb(main):004:1> puts "Code = #{response.code}" irb(main):005:1> puts "Message = #{response.message}" irb(main):006:1> response.each {|key, val| printf "%-14s = %-40.40s\n", key, val } irb(main):007:1> p response.body[400, 55] irb(main):008:1> end Code = 200 Message = OK last-modified = Tue, 30 Jan 2007 15:33:09 GMT content-type = text/html; charset=iso-8859-1 etag = "b00d226-85d2-45bf6535" date = Wed, 31 Jan 2007 09:36:07 GMT server = Rapidsite/Apa/1.3.31 (Unix) FrontPage/5. content-length = 34258 accept-ranges = bytes "lling book 'The Pragmatic Programmer' and The\n " => nil
Good luck,
-Conrad