++ed by:

1 non-PAUSE user(s).

Stephen Adkins

NAME

App::Request::CGI - the request

SYNOPSIS

   # ... official way to get a Request object ...
   use App;
   $context = App->context();
   $request = $context->request();  # get the request

   # ... alternative way (used internally) ...
   use App::Request::CGI;
   $request = App::Request::CGI->new();

DESCRIPTION

A Request class implemented using the CGI class.

Protected Methods:

The following methods are intended to be called by subclasses of the current class (or environmental, "main" code).

_init()

The _init() method is called from within the standard Request constructor. The _init() method in this class does nothing. It allows subclasses of the Request to customize the behavior of the constructor by overriding the _init() method.

    * Signature: $request->_init()
    * Param:     void
    * Return:    void
    * Throws:    App::Exception
    * Since:     0.01

    Sample Usage: 

    $request->_init();

Public Methods

get_session_id()

The get_session_id() method returns the session_id in the request.

    * Signature: $session_id = $request->get_session_id();
    * Param:  void
    * Return: $session_id     string
    * Throws: <none>
    * Since:  0.01

    Sample Usage: 

    $session_id = $request->get_session_id();

get_events()

The get_events() method analyzes an HTTP request and returns the events within it which should be executed.

It is called primarily from the event loop handler, dispatch_events(). However, it might also be called from external software if that code manages the event loop itself. i.e. it instantiates the CGI object outside of the Context and passes it in, never calling dispatch_events().

    * Signature: $request->get_events()
    * Signature: $request->get_events($cgi)
    * Param:     $cgi            (CGI)
    * Return:    void
    * Throws:    App::Exception
    * Since:     0.01

    Sample Usage: 

    $request->get_events();

user()

The user() method returns the username of the authenticated user. The special name, "guest", refers to the unauthenticated (anonymous) user.

    * Signature: $username = $request->user();
    * Param:  void
    * Return: string
    * Throws: <none>
    * Since:  0.01

    Sample Usage: 

    $username = $request->user();

The header() method returns the specified HTTP header from the request.

    * Signature: $header_value = $request->header($header_name);
    * Param:  $header_name    string
    * Return: $header_value   string
    * Throws: <none>
    * Since:  0.01

    Sample Usage: 

    $header_value = $request->header("Accept-Encoding");

url()

The url() method returns information about the request url.

    * Signature: $url = $request->url();
    * Return: $url   string

    Sample Usage: 

    $url = $request->url();