PerlDoc

26 August 2025 - 17:41 | Version 1 |
See PublishedAPI for packages intended to be used by Plugin and Contrib authors, or browse all packages.
See also Developing plugins, Developer's Bible, Technical Overview


Parent package: Foswiki::UI
Child packages:

    internal package Foswiki::UI::Rest

    UI delegate for REST interface

    StaticMethod registerRESTHandler( $subject, $verb, \&fn, %options )

    Adds a function to the dispatch table of the REST interface for a given subject. See CommandAndCGIScripts for more info.

    The handler function must be of the form:
    sub handler(\%session, $subject, $verb, $response) -> $text
    
    where:

    If the redirectto parameter is not present on the REST request, then the return value from the handler is used to determine the endpoint for the request. It can be:

    Additional options are set in the %options hash. These options are important to ensuring that requests to your handler can't be used in cross-scripting attacks, or used for phishing.