Automated REST Method Dispatching
This Action handles doing automatic method dispatching for REST requests.
It takes a normal Catalyst action, and changes the dispatch to append an
underscore and method name. First it will try dispatching to an action with
the generated name, and failing that it will try to dispatch to a regular
method.
For example, in the synopsis above, calling GET on "/foo" would result in
the foo_GET method being dispatched.
If a method is requested that is not implemented, this action will return a
status 405 (Method Not Found). It will populate the "Allow" header with the
list of implemented request methods. You can override this behavior by
implementing a custom 405 handler like so:
sub foo_not_implemented {
... handle not implemented methods ...
}
If you do not provide an _OPTIONS subroutine, we will automatically respond
with a 200 OK. The "Allow" header will be populated with the list of
implemented request methods.
It is likely that you really want to look at the Catalyst::Controller::REST
manpage, which brings this class together with automatic Serialization of
requests and responses.
When you use this module, it adds the the Catalyst::TraitFor::Request::REST
manpage role to your request class.
- Sources inherited from project devel:languages:perl
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout home:Tomcat42/perl-Catalyst-Action-REST && cd $_
- Create Badge
Source Files
Filename | Size | Changed |
---|---|---|
Catalyst-Action-REST-1.21.tar.gz | 0000051320 50.1 KB | |
cpanspec.yml | 0000000547 547 Bytes | |
perl-Catalyst-Action-REST.changes | 0000002401 2.34 KB | |
perl-Catalyst-Action-REST.spec | 0000003848 3.76 KB |
Latest Revision
- Fix autogenerated changes - updated to 1.21 see /usr/share/doc/packages/perl-Catalyst-Action-REST/Changes 1.21 2017-12-05 10:05:25-05:00 America/New_York
Comments 0