Matt <matt / greenviolet.net> writes:

> Since I have yet to find a comprehensive tutorial for CGI using Ruby, I'm still stumbling around in many respects. (I'm sure they exist in Japanese, but I haven't learned it yet... :/ )
> 
> What I would like to know now is: Does ruby have a simple method to detect whether a form was submitted via POST or GET? For example, let's say I want to use the Safe: header (RFC2310). I obviously don't want to include this on GET requests. The Safe: header was just a convenient (simple) example similar to what I need to do. So, no, I don't have a particular need for Safe: yes right now, before you ask. ;) Any suggestions?
> 
> I checked the RAA and the Ruby Cookbook, but didn't see anything that was similar to what I'm doing. Any other places I should look?

You should be able to look at ENV['REQUEST_METHOD']. The CGI protocol says
that this environment variable is set to to 'POST', 'GET', or 'HEAD'.

Jim
-- 
Jim Menard, jimm / io.com, http://www.io.com/~jimm/
"Sanity is a one-trick pony: rationality is all you get. With insanity,
the sky's the limit!" -- The Tick