Navigation Menu

Skip to content

Commit

Permalink
added example for accessing the request body
Browse files Browse the repository at this point in the history
  • Loading branch information
kraih committed Sep 16, 2013
1 parent 387d6ec commit eeac9ab
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/Mojolicious/Lite.pm
Expand Up @@ -225,6 +225,12 @@ full access to all HTTP features and information.
$self->render(text => "Request by $ua reached $host.");
};
# Echo the request body
get '/echo' => sub {
my $self = shift;
$self->render(data => $self->req->body);
};
app->start;
=head2 Route names
Expand Down

0 comments on commit eeac9ab

Please sign in to comment.