1 package Test::Catalyst::Action::REST::Controller::REST;
6 use base 'Catalyst::Controller::REST';
11 entity => { test => 'worked', data => $c->req->data } );
14 sub test_status_created : Local {
15 my ( $self, $c ) = @_;
16 $self->status_created(
19 entity => { status => 'created' }
23 sub test_status_accepted : Local {
24 my ( $self, $c ) = @_;
25 $self->status_accepted( $c, entity => { status => "queued", } );
28 sub test_status_no_content : Local {
29 my ( $self, $c ) = @_;
30 $self->status_no_content($c);
33 sub test_status_bad_request : Local {
34 my ( $self, $c ) = @_;
35 $self->status_bad_request( $c,
36 message => "Cannot do what you have asked!", );
39 sub test_status_not_found : Local {
40 my ( $self, $c ) = @_;
41 $self->status_not_found( $c,
42 message => "Cannot find what you were looking for!", );
45 sub test_status_gone : Local {
46 my ( $self, $c ) = @_;
47 $self->status_gone( $c,
48 message => "Document have been deleted by foo", );