| Apache2-REST documentation | Contained in the Apache2-REST distribution. |
Apache2::REST::Handler::test::user - Test dummy user handler
Echoes a message.
Allows GET
| Apache2-REST documentation | Contained in the Apache2-REST distribution. |
package Apache2::REST::Handler::test::user ; use base qw/Apache2::REST::Handler/ ;
sub GET{ my ( $self , $req , $resp ) = @_ ; $resp->data()->{'user_message'} = 'You are accessing user '.$self->userid() ; $resp->data()->{'user'} = { 'name' => "\x{111}\x{103}ng t\x{1ea3}i t\x{1ea1}i", 'email' => 'jerome@eteve.net' , }; return Apache2::Const::HTTP_OK ; }
sub isAuth{ my ( $self , $method , $req ) = @_ ; ## if not no auth token return $method eq 'GET' ; } 1;