On Tue, 18 Sep 2001, Wild Karl-Heinz wrote:
> YM> In message "[ruby-talk:21315] Suggestions for new CGI lib"
> YM>     on 01/09/18, Anders Johannsen <anders / johannsen.com> writes:
> 
> YM> |CGI::Request::Post # cgi.request.post
> YM> |CGI::Request::Get # cgi.request.get
> YM> |CGI::Request::Env # cgi.request.env
> YM> |CGI::Request::Var # cgi.request.var
> 
> YM> I'm not sure what they are for.  The current cgi.rb provides higher
> YM> abstraction not to distinguish get/post/head.  I think unified access
> YM> method (for example cgi.request["user_var"]) is better.  Perhaps
> YM> cgi.request.var is for this purpose?
> 
> imho it should be possible to select the values in the shown way.
> just for security and to be more flexible.
> 
> ..:request.post["user_var"] or
> ..:request.get["user_var"]
> 

IMHO, this is dumb b/c a request can only be instantiated with either POST
or GET.

Correct way would be:

..:request.form["user_var"]

 to get the vars, and

..:request.method

to find out if the current request is in GET or POST.

I not sure what you mean by 'for security', and I'm not buy flexibility
when you are reducing a common and useful abstraction.