From: Minero Aoki Date: 2001-12-22T12:46:32+09:00 Subject: [ruby-talk:29285] Re: HTTP POST In mail "[ruby-talk:29282] Re: HTTP POST" Jim Menard wrote: > Thank you for responding. Here are the results: > And just in case this helps, I added > and the output of that was > servlet-engine => Tomcat Web Server/3.2.3 (JSP 1.1; Servlet 2.2; Java 1.3.1-internal; FreeBSD 4.4-STABLE i386; java.vendor=Sun Microsystems Inc.) Hmm. I've heard that Tomcat always requires Content-Type. Try this: Net::HTTP.start(HOST, PORT) {|http| res = http.post(PATH, 'Content-Type' => 'x-www-form-urlencoded') p res.body } FYI: In 1.7, net/http automatically set Content-Type to x-www-form-urlencoded. I'll also backport it to 1.6 soon. -- Minero Aoki