From: Michael Witrant Date: 2001-07-27T00:32:31+09:00 Subject: [ruby-talk:18571] Re: Need example for Net::HTTP Post On Thu, 26 Jul 2001 23:44:40 +0900, rbovet@iname.com (Ray Bovet) wrote: > As a complete newbie to ruby I thought I'd start out by writing a > simple program to retrieve some information from an http server. I > found the description of Net::HTTP and the post routine in the > appendix of the admirable Pickaxe book, but was unable to get it to > work. Is there a place to look for example code for such things? Here is a small example: require 'net/http' require 'cgi' h = Net::HTTP.new("localhost", 80) resp, body = h.post("/cgi-bin/test_post", "foo=" + CGI.escape("bar!") + "&bar=" + CGI.escape("foo, foo & foo") ) Mike. midulo.