1Catalyst::Action::REST:U:sFeorrBCroonwtsreirbsu(t3e)d PeCraltaDloycsutm:e:nAtcattiioonn::REST::ForBrowsers(3)
2
3
4

NAME

6       Catalyst::Action::REST::ForBrowsers - Automated REST Method Dispatching
7       that Accommodates Browsers
8

SYNOPSIS

10           sub foo :Local :ActionClass('REST::ForBrowsers') {
11             ... do setup for HTTP method specific handlers ...
12           }
13
14           sub foo_GET : Private {
15             ... do something for GET requests ...
16           }
17
18           sub foo_GET_html : Private {
19             ... do something for GET requests from browsers ...
20           }
21
22           sub foo_PUT : Private {
23             ... do something for PUT requests ...
24           }
25

DESCRIPTION

27       This class subclasses Catalyst::Action::REST to add an additional
28       dispatching hook. If the request is a GET request and the request looks
29       like it comes from a browser, it tries to dispatch to a "GET_html"
30       method before trying to the "GET" method instead. All other HTTP
31       methods are dispatched in the same way.
32
33       For example, in the synopsis above, calling GET on "/foo" from a
34       browser will end up calling the "foo_GET_html" method. If the request
35       is not from a browser, it will call "foo_GET".
36
37       See Catalyst::Action::REST for more details on dispatching details.
38

METHODS

40       dispatch
41           This method overrides the default dispatch mechanism to the re-
42           dispatching mechanism described above.
43

SEE ALSO

45       You likely want to look at Catalyst::Controller::REST, which implements
46       a sensible set of defaults for a controller doing REST.
47
48       This class automatically adds the
49       Catalyst::TraitFor::Request::REST::ForBrowsers role to your request
50       class.
51

CONTRIBUTORS

53       Dave Rolsky <autarch@urth.org>
54
56       Copyright the above named AUTHOR and CONTRIBUTORS
57

LICENSE

59       You may distribute this code under the same terms as Perl itself.
60
61
62
63perl v5.32.0                      2020-07C-a2t8alyst::Action::REST::ForBrowsers(3)
Impressum