From: t0m Date: Sun, 5 Jul 2009 13:12:48 +0000 (+0100) Subject: Remote trailing space X-Git-Tag: 0.74~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Action-REST.git;a=commitdiff_plain;h=afa581cfe886e1074fcd7348e9f0d757c494874c Remote trailing space --- diff --git a/lib/Catalyst/Action/REST.pm b/lib/Catalyst/Action/REST.pm index d887f22..cf803d6 100644 --- a/lib/Catalyst/Action/REST.pm +++ b/lib/Catalyst/Action/REST.pm @@ -37,11 +37,11 @@ Catalyst::Action::REST - Automated REST Method Dispatching ... do setup for HTTP method specific handlers ... } - sub foo_GET { + sub foo_GET { ... do something for GET requests ... } - sub foo_PUT { + sub foo_PUT { ... do somethign for PUT requests ... } @@ -49,13 +49,13 @@ Catalyst::Action::REST - 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. +underscore and method name. 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 +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: