NAME

Mojo::Filter - HTTP 1.1 Filter Base Class

SYNOPSIS

    use base 'Mojo::Filter';

DESCRIPTION

Mojo::Filter is an abstract base class for HTTP 1.1 filters as described in RFC 2616.

ATTRIBUTES

Mojo::Filter implements the following attributes.

headers

    my $headers = $filter->headers;
    $filter     = $filter->headers(Mojo::Headers->new);

The headers.

input_buffer

    my $input_buffer = $filter->input_buffer;
    $filter          = $filter->input_buffer(Mojo::ByteStream->new);

Input buffer for filtering.

output_buffer

    my $output_buffer = $filter->output_buffer;
    $filter           = $filter->output_buffer(Mojo::ByteStream->new);

Output buffer for filtering.

METHODS

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

build

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

Build filtered content.

is_done

    my $done = $filter->is_done;

Check if filter is done.

parse

    $filter = $filter->parse;

Filter content.

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicious.org.