Puncheur
view release on metacpan or search on metacpan
lib/Puncheur/Plugin/JSON.pm view on Meta::CPAN
'Content-Type' => $self->html_content_type,
'Content-Length' => length($content),
],
[$content],
);
}
my $encoding = $self->encoding;
$encoding = lc $encoding->mime_name if ref $encoding;
# add UTF-8 BOM if the client is Safari
if ( $user_agent =~ m/Safari/ and $encoding eq 'utf-8' ) {
$body = "\xEF\xBB\xBF" . $body;
}
return $self->create_response(
200,
[
'Content-type' => "application/json; charset=$encoding",
'Content-Length' => length($body)
],
( run in 0.451 second using v1.01-cache-2.11-cpan-131fc08a04b )