Mojo::Filter::Chunked(3) HTTP 1.1 Chunked Filter

SYNOPSIS


use Mojo::Filter::Chunked;
my $chunked = Mojo::Filter::Chunked->new;
$chunked->headers(Mojo::Headers->new);
$chunked->input_buffer(Mojo::ByteStream->new);
$chunked->output_buffer(Mojo::ByteStream->new);
$chunked->input_buffer->add_chunk("6\r\nHello!")
$chunked->parse;
print $chunked->output_buffer->empty;
print $chunked->build('Hello World!');

DESCRIPTION

Mojo::Filter::Chunked is a filter for the HTTP 1.1 chunked transfer encoding as described in RFC 2616.

ATTRIBUTES

Mojo::Filter::Chunked inherits all attributes from Mojo::Filter.

METHODS

Mojo::Filter::Chunked inherits all methods from Mojo::Filter and implements the following new ones.

build

    my $formatted = $filter->build('Hello World!');

Build chunked content.

parse

    $filter = $filter->parse;

Filter chunked content.