[Catalyst] Index action using Catalyst::Controller::REST - Is it possible?

Kyle Hall kyle.m.hall at gmail.com
Tue Apr 26 17:37:50 GMT 2011


Hello all,
  I'm trying to write a REST service using the REST controller. The
problem I'm running into is I can't seem to use 'index' as I can with
the standard catalyst controller. I would like my URIs to look like
/api/rest/documents, /api/rest/staff and so on. From these paths I
would like to do the standard GET, PUT, POST and DELETE calls.

However, if I create the controller
MyApp::Controller::API::REST::Documents, and I try this:
   sub index : Local : ActionClass('REST') {}
The system loads this as the path action /api/rest/documents/index.

Any idea what I'm doing wrong?

Thanks,
Kyle

http://www.kylehall.info
Mill Run Technology Solutions ( http://millruntech.com )
Crawford County Federated Library System ( http://www.ccfls.org )
Meadville Public Library ( http://www.meadvillelibrary.org )



More information about the Catalyst mailing list