r44@latte: adam | 2006-12-01 00:12:17 -0800
adam [Fri, 1 Dec 2006 08:08:14 +0000 (08:08 +0000)]
 Fixed some spacing in the Changelog
 Added some documentation for the re-factored Catalyst::Action::REST

Changelog
lib/Catalyst/Action/REST.pm

index 8f73dd1..b461037 100644 (file)
--- a/Changelog
+++ b/Changelog
@@ -5,12 +5,12 @@ Thu Nov 30 23:51:04 PST 2006 (adam)
          of the default sub.  (daisuke++ pointed out the inconsistency and
          provided a patch, and I added the foo_not_implemented support)
 
-    Added in automated OPTIONS handler, which constructs the allow
+       Added in automated OPTIONS handler, which constructs the allow
          header for you, just like the 405 handler.  Can be overridden
          with a normal _METHOD sub.
 
        Refactored Test::Rest, so that it uses closures to create the
-       very similar $test->method() subs.
+         very similar $test->method() subs.
 
        Added tests for Catalyst::Action::REST.
 
index fe63ee9..9411ac2 100644 (file)
@@ -23,7 +23,9 @@ Catalyst::Action::REST - Automated REST Method Dispatching
 
 =head1 SYNOPSIS
 
-    sub foo :Local :ActionClass('REST') {}
+    sub foo :Local :ActionClass('REST') {
+      ... do setup for HTTP method specific handlers ...
+    }
 
     sub foo_GET { 
       ... do something for GET requests ...
@@ -44,9 +46,20 @@ 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.
+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 L<Catalyst::Controller::REST>.
+It is likely that you really want to look at L<Catalyst::Controller::REST>,
+which brings this class together with automatic Serialization of requests
+and responses.
 
 =head1 METHODS