Hi,

In message "[ruby-talk:19026] YAWN Question (Your Annoying Wandering Newbie)"
    on 01/08/02, Matt <matt / greenviolet.net> writes:

|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?

If you are using 'cgi' library,

  require 'cgi'

  cgi = CGI::new
  puts cgi.request_method	# => "GET" or "POST", or whatever

							matz.