From: Robert Klemme Date: 2005-11-12T01:07:14+09:00 Subject: Re: net/http broken? tsuraan wrote: > The documentation for net/http on ruby-doc.org gives the following > snippet for getting data from a server using HTTP POST: > > require 'net/http' > require 'uri' > > res = > > > Net::HTTP.post_form(URI.parse('http://www.example.com/search.cgi'), > {'q'=>'ruby', 'max'=>'50'}) puts res.body > > The problem with this is that in ruby 1.8.2 on both my OSX box and my > FreeBSD computer, Net::HTTP does not have a post_form defined. Hm, 1.8.3 has it: 17:02:52 [~]: ruby -r net/http -e 'p RUBY_VERSION; p Net::HTTP.public_methods.grep /post/i' -e:1: warning: parenthesize argument(s) for future version "1.8.3" ["post_form"] This is on cygwin. I wouldn't assume that post_form was removed in 1.8.2 and added in 1.8.3. Are you sure the method is not present? (You can test with the same code snippet.) Kind regards robert