![]() |
![]()
| ![]() |
![]()
NAMEHTTP::Proxy::HeaderFilter - A base class for HTTP message header filters SYNOPSISpackage MyFilter; use base qw( HTTP::Proxy::HeaderFilter ); # changes the User-Agent header in all requests # this filter must be pushed on the request stack sub filter { my ( $self, $headers, $message ) = @_; $message->headers->header( User_Agent => 'MyFilter/1.0' ); } 1; DESCRIPTIONThe HTTP::Proxy::HeaderFilter class is used to create filters for HTTP request/response headers. Creating a HeaderFilterA HeaderFilter is just a derived class that implements some methods called by the proxy. Of all the methods presented below, only filter() must be defined in the derived class.
Standard HeaderFiltersStandard HTTP::Proxy::HeaderFilter classes are lowercase. The following HeaderFilters are included in the HTTP::Proxy distribution:
Please read each filter's documentation for more details about their use. USEFUL METHODS FOR SUBCLASSESSome methods are available to filters, so that they can eventually use the little knowledge they might have of HTTP::Proxy's internals. They mostly are accessors.
AUTHORPhilippe "BooK" Bruhat, <book@cpan.org>. SEE ALSOHTTP::Proxy, HTTP::Proxy::BodyFilter. COPYRIGHTCopyright 2003-2015, Philippe Bruhat. LICENSEThis module is free software; you can redistribute it or modify it under the same terms as Perl itself.
|