Plack-Middleware-DebugLogging

 view release on metacpan or  search on metacpan

t/basic.t  view on Meta::CPAN

Response Code: 200; Content-Type: text/plain; Content-Length: unknown
Response Headers:
.-----------------+------------------------------------------------------.
| Header Name     | Value                                                |
+-----------------+------------------------------------------------------+
| Content-Type    | text/plain                                           |
'-----------------+------------------------------------------------------'

LOG
, 'json body with content-type set deserialized properly'};
# Testing streaming responses

$log = "";
$handler = builder {
    enable 'Plack::Middleware::DebugLogging',
        logger => sub { $log .= $_[0]->{message}."" }, term_width => 80;
    sub {
        return sub {
            my $writer = $_[0]->( [ 200, [ 'Content-Type' => 'text/plain' ] ] );
            $writer->write("OK");
            $writer->close;

t/basic.t  view on Meta::CPAN


Response Code: 200; Content-Type: text/plain; Content-Length: unknown
Response Headers:
.-----------------+------------------------------------------------------.
| Header Name     | Value                                                |
+-----------------+------------------------------------------------------+
| Content-Type    | text/plain                                           |
'-----------------+------------------------------------------------------'

LOG
, 'keywords and streaming responses work.'}

done_testing;



( run in 0.235 second using v1.01-cache-2.11-cpan-4d50c553e7e )