1 package Test::Catalyst::Action::REST::Controller::Actions;
5 use base qw/Catalyst::Controller::REST/;
7 __PACKAGE__->config( namespace => 'actions' );
9 sub begin {} # Don't need serialization..
11 sub test : Local : ActionClass('REST') {
12 my ( $self, $c ) = @_;
13 $c->stash->{'entity'} = 'something';
16 sub test_GET : Private ActionClass('+Test::Action::Class') {
17 my ( $self, $c ) = @_;
19 $c->stash->{'entity'} .= " GET";
23 sub test_POST : Action ActionClass('+Test::Action::Class') {
24 my ( $self, $c ) = @_;
26 $c->stash->{'entity'} .= " POST";
30 sub test_PUT :ActionClass('+Test::Action::Class') {
31 my ( $self, $c ) = @_;
33 $c->stash->{'entity'} .= " PUT";
37 sub test_DELETE :ActionClass('+Test::Action::Class') {
38 my ( $self, $c ) = @_;
39 $c->stash->{'entity'} .= " DELETE";
43 sub test_OPTIONS :ActionClass('+Test::Action::Class') {
44 my ( $self, $c ) = @_;
46 $c->stash->{'entity'} .= " OPTIONS";
50 sub notreally : Local : ActionClass('REST') {
53 sub notreally_GET :ActionClass('+Test::Action::Class') {
54 my ( $self, $c ) = @_;
56 $c->stash->{'entity'} = "notreally GET";
60 sub not_implemented : Local : ActionClass('REST') {
63 sub not_implemented_GET :ActionClass('+Test::Action::Class') {
64 my ( $self, $c ) = @_;
66 $c->stash->{'entity'} = "not_implemented GET";
70 sub not_implemented_not_implemented :ActionClass('+Test::Action::Class') {
71 my ( $self, $c ) = @_;
73 $c->stash->{'entity'} = "Not Implemented Handler";
77 sub not_modified : Local : ActionClass('REST') { }
79 sub not_modified_GET {
80 my ( $self, $c ) = @_;
86 my ( $self, $c ) = @_;
88 $c->res->content_type('text/plain');
89 $c->res->body( $c->stash->{'entity'} );
92 sub end : Private {} # Don't need serialization..