Group
Extension

Matches 1

Catalyst-ResponseHelpers ( T/TS/TSIBLEY/Catalyst-ResponseHelpers-1.02.tar.gz, TSIBLEY, 2016; MetaCPAN )
Catalyst-ResponseHelpers/lib/Catalyst/ResponseHelpers.pm ( view source; MetaCPAN )
   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

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.