|
NAMEPOE::Filter::HTTP::Parser - A HTTP POE filter for HTTP clients or serversVERSIONversion 1.08SYNOPSISuse POE::Filter::HTTP::Parser; # For HTTP Servers my $request_filter = POE::Filter::HTTP::Parser->new( type => 'server' ); my $arrayref_of_request_objects = $filter->get( [ $stream ] ); my $arrayref_of_HTTP_stream = $filter->put( $arrayref_of_response_objects ); # For HTTP clients my $response_filter = POE::Filter::HTTP::Parser->new( type => 'client' ); my $arrayref_of_HTTP_stream = $filter->put( $arrayref_of_request_objects ); my $arrayref_of_response_objects = $filter->get( [ $stream ] ); DESCRIPTIONPOE::Filter::HTTP::Parser is a POE::Filter for HTTP which is based on HTTP::Parser.It can be used to easily create POE based HTTP servers or clients. With the "type" set to "client", which is the default behaviour, "get" will parse HTTP::Response objects from HTTP streams and "put" will accept HTTP::Request objects and convert them to HTTP streams. With the "type" set to "server", the reverse will happen. "get" will parse HTTP::Request objects from HTTP streams and "put" will accept HTTP::Response objects and convert them to HTTP streams. Like POE::Filter::HTTPD if there is an error parsing the HTTP request, this filter will generate a HTTP::Response object instead, to encapsulate the error message, suitable for simply sending back to the requesting client. CONSTRUCTOR
METHODS
CREDITSThe "put" method for HTTP responses was borrowed from POE::Filter::HTTPD, along with the code to generate HTTP::Response on a parse error, by Artur Bergman and Rocco Caputo.SEE ALSOPOE::FilterHTTP::Parser POE::Filter::HTTPD AUTHORChris Williams <chris@bingosnet.co.uk>COPYRIGHT AND LICENSEThis software is copyright (c) 2016 by Chris Williams, Artur Bergman and Rocco Caputo.This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
Visit the GSP FreeBSD Man Page Interface. |