From: Ben Aroia Date: 2008-04-10T23:46:44+09:00 Subject: Ruby HTTP GET Headers I've looked here: http://snippets.dzone.com/posts/show/788 and I'm not really understanding it. I am creating a client for a website, and I want to set the User-Agent field of the header I am sending. Is there a simple way to do this or is this along the lines of creating custom HTTP objects? I've also looked into the open-uri class, but I get this error: Errno::EHOSTDOWN: Host is down - connect(2) method initialize in http.rb at line 560 method open in http.rb at line 560 method connect in http.rb at line 560 method timeout in timeout.rb at line 48 method timeout in timeout.rb at line 76 method connect in http.rb at line 560 method do_start in http.rb at line 553 method start in http.rb at line 542 method open_http in open-uri.rb at line 242 method buffer_open in open-uri.rb at line 626 method open_loop in open-uri.rb at line 164 method catch in open-uri.rb at line 162 method open_loop in open-uri.rb at line 162 method open_uri in open-uri.rb at line 132 method open in open-uri.rb at line 528 method open in open-uri.rb at line 30 at top level in rubyheader.rb at line 8 I attached the test file I am working on. Any help would be great. Thanks. Attachments: http://www.ruby-forum.com/attachment/1716/rubyheader.rb -- Posted via http://www.ruby-forum.com/.