From: Matthew Smillie Date: 2006-01-04T19:23:26+09:00 Subject: Re: Net::HTTP.post_form method undefined? On Jan 4, 2006, at 9:42, Alex Fenton wrote: > itsme213 wrote: >> I'm trying to do a POST using net/http. >> r = Net::HTTP.post_form(u,{'volumectrl'=>'-20'}) >> I get: >> NoMethodError: undefined method `post_form' for Net::HTTP:Class >> from (irb):5 > > What ruby version are you running? I ran into this same problem > last week, and it was because the standard stdlib documentation (on > ruby-doc) refers to ruby 1.9, where the post_form method exists. It > doesn't exist in ruby 1.8. Annoying huh? It exists in 1.8.3, it would seem: [Prospero:~] matt% ruby -v ruby 1.8.3 (2005-09-21) [powerpc-darwin8.3.0] [Prospero:~] matt% ruby require 'net/http' puts Net::HTTP.methods.include?("post_form") true I've used it with no problems at all, in the same basic format as the original poster. matthew smillie.