Mojo::Filter(3) 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 inherits all attributes from Mojo::Stateful and implements the following new ones.

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::Stateful and implements the following new ones.

build

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

Build filtered content.

parse

    $filter = $filter->parse;

Filter content.