The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Mojolicious::Plugin::CBOR - render a CBOR response with Mojolicious

SYNOPSIS

        # Mojolicious
        $self->plugin('CBOR');

        # Mojolicious::Lite
        plugin 'CBOR';

        # In controller
        $self->render(cbor => $data, handler => 'cbor');

DESCRIPTION

Mojolicious::Plugin::CBOR is a Mojolicious plugin that packs any data you send to the 'cbor' parameter with CBOR::XS and renders it.

The "Content-Type" header sent in the response will be set to "application/cbor; charset=UTF-8".

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicio.us.

This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.

See http://dev.perl.org/licenses/ for more information.