RayApp::Request - common object for both mod_perl and CGI requests
my $q = new RayApp::Request($r); print $q->param('name');
The RayApp module can operate both as a mod_perl handler and as a CGI application. You can switch from one mode to another by simply changing the Apache configuration, without any change in your .pl or .mpl code. In fact, you can have both mod_perl and CGI handling specified for the same directory -- the first is nice for production speed, the second makes sure that all your module changes are reloaded properly for each request, should you be doing some development changes.
The RayApp::Request module provides unified interface to CGI.pm and Apache2::Request objects. The following method are available:
The constructor. If you pass in an argument, it is considered to be a Apache2::RequestRec object, and the APR routines will be used. Otherwith CGI.pm is used.
A method for fetching or setting the value of parameters. For GET, it always deals with the values from the query string, for POST it handles only the values from the body of the HTTP request.
If run without any argument, it returns the list of parameters.
If run with one argument, it returns one (in scalar context) or all values for the given parameter name.
If run with multiple parameters, the second to the last are set as the new value of the parameter, whose name is the first argument.
Deletes the value (or values) from the parameter whose name is the first argument.
- user, remote_user
Returns the login used for the HTTP Basic authentication, if it is an authenticated request.
Returns the request method.
The URL of the referer, provided the client sends the appropriate HTTP header.
Returns the self url of the request. Can take arguments
The IP address of the remote host (the client).
The name of the remote host, provided the httpd server is set to do the DNS lookups.
The raw body of the request. Usefull for fetching XML documents or other inputs that are not CGI parameter values.
Returns one or multiple RayApp::Request::Upload objects that provide access to uploaded files. The object has the following methods: filename, size, content_type, and content.
Returns on or multiple values of a HTTP cookie, submitted by the client.
Copyright (c) Jan Pazdziora 2001--2006
This documentation is believed to describe accurately RayApp version 2.004.