Skip to content

Commit

Permalink
Serialize request body.
Browse files Browse the repository at this point in the history
  • Loading branch information
pangyre committed Aug 16, 2011
1 parent c94066e commit d856100
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/echo.psgi
Expand Up @@ -6,6 +6,9 @@ use Data::Dump;
sub {
my $req = Plack::Request->new(shift);
my $body = Data::Dump::dump($req);
$body .= "\n\n-- \n" . $req->content . "\n"
if $req->content;

return [ 200,
[ "Content-Type" => "text/plain; charset=utf-8",
"Content-Length" => length($body), ],
Expand Down

0 comments on commit d856100

Please sign in to comment.