Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Catalyst::Action::REST 1.05

    Download button

    No screenshots available
    Downloads: 135  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Tomas Doran | More programs
    Perl Artistic License / FREE
    July 7th, 2012, 05:03 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Catalyst::Action::REST description

    Automated REST Method Dispatching

    Catalyst::Action::REST 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 Catalyst::Controller::REST, which brings this class together with automatic Serialization of requests and responses.

    When you use this module, it adds the Catalyst::TraitFor::Request::REST role to your request class.

    SYNOPSIS

     sub foo :Local :ActionClass('REST') {
     ... do setup for HTTP method specific handlers ...
     }

     sub foo_GET {
     ... do something for GET requests ...
     }

     # alternatively use an Action
     sub foo_PUT : Action {
     ... do something for PUT requests ...
     }



    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    REST method dispatching | Perl module | Perl | REST | dispatching

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM