Forbidden
NotFound
ClientError
ServerError
TextPlain
AsJSON
FromFile
FromCharString
FromByteString
FromHandle
Redirec
$c->detach;
}
=head2 AsJSON($c, $status?, $data)
Sets a JSON 200 OK response by default, with an optional custom status. Data
should be serializable by a view named C<JSON> provided by your applic
ation
(e.g. via L<Catalyst::View::JSON>).
=cut
sub AsJSON {
my ($c, $status, $data) = @_;
($status, $data) = (undef, $status)
if @_ == 2;
$status //= HTTP_OK;
$c->response->s