Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://wiki.cs.msu.ru/System/PerlDoc?module=Foswiki::UI::Rest
Дата изменения: Unknown Дата индексирования: Mon Apr 11 00:56:50 2016 Кодировка: koi8-r |
internal package
Foswiki::UI::Rest internal package
Foswiki::UI::Rest UI delegate for REST interface
StaticMethod
registerRESTHandler( $subject, $verb, \&fn, %options ) $subject
- The subject under which the function will be registered.
$verb
- The verb under which the function will be registered.
\&fn
- Reference to the function.
sub handler(\%session, $subject, $verb) -> $textwhere:
\%session
- a reference to the Foswiki session object (may be ignored)
$subject
- The invoked subject (may be ignored)
$verb
- The invoked verb (may be ignored)
%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. authenticate
- use this boolean option to require authentication for the handler. If this is set, then an authenticated session must be in place or the REST call will be rejected with a 401 (Unauthorized) status code. By default, rest handlers do not require authentication.
validate
- use this boolean option to require validation of any requests made to this handler. By default, requests made to REST handlers are not validated.
http_allow
use this option to specify the HTTP methods that can be used to invoke the handler.