The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

App::Dochazka::REST::Dispatch - path dispatch

VERSION

Version 0.185

DESCRIPTION

This is the top-level dispatch module: i.e., it contains dispatch targets for the top-level resources defined in config/dispatch/dispatch_Top_Config.pm.

RESOURCES

This section documents the resources whose dispatch targets are contained in this source module. For the resource definitions, see config/dispatch/dispatch_Top_Config.pm.

Each resource can have up to four targets (one each for the four supported HTTP methods GET, POST, PUT, and DELETE). That said, target routines may be written to handle more than one HTTP method and/or more than one resoure.

"" or /

This is the toppest of the top-level targets or, if you wish, the "root target". If the base UID of your App::Dochazka::REST instance is http://dochazka.site:5000 and your username/password are "demo/demo", then this resource is triggered by either of the URLs:

    http://demo:demo@dochazka.site:5000
    http://demo:demo@dochazka.site:5000/

In terms of behavior, this resource is identical to help (see below).

help

If the base UID of your App::Dochazka::REST instance is http://dochazka.site:5000 and your username/password are "demo/demo", then this resource is triggered by either of the URLs:

    http://demo:demo@dochazka.site:5000/help
    http://demo:demo@dochazka.site:5000/help/
    

(This information applies analogously to all the resources described herein.)

The purpose of the help resource is to give the user an overview of all the top-level resources available to her, with regard to her privlevel and the HTTP method being used.

That means, for example:

  • If the HTTP method is, GET, only resources with GET targets will be displayed

  • If the user's privlevel is 'inactive', only resources whose ACL profile is 'inactive' or lower (i.e., 'inactive' or 'passerby') will be displayed

The information provided is sent as a JSON string in the HTTP response body, and includes the resource's name, full URI, ACL profile, and brief description, as well as a link to the App::Dochazka::REST on-line documentation.

TARGETS