GX::HTTP::Parser::Body - HTTP message body parser base class
None.
This module provides the GX::HTTP::Parser::Body class which extends the GX::Class::Object class.
new
Returns a new parser object or undef if the specified content type is not supported.
undef
$parser = GX::HTTP::Parser::Body->new( %attributes );
content_type ( string ) [ required ]
content_type
Supported content types:
application/x-www-form-urlencoded
multipart/form-data
discard_uploads ( bool )
discard_uploads
A boolean flag indicating whether or not to discard uploads. Defaults to false.
tmp_dir ( string )
tmp_dir
A path to the directory that should be used to store temporary data.
$parser ( GX::HTTP::Parser::Body object | undef )
$parser
GX::Exception
parse
Takes a body object, parses its content and returns a reference to a hash with the result, or returns undef if the body cannot be parsed.
$result = $parser->parse( $body );
$body ( GX::HTTP::Body object )
$body
$result ( HASH reference | undef )
$result
HASH
$result = { parameters => $parameters, # GX::HTTP::Parameters object parts => \@parts, # ARRAY reference containing HASH references uploads => $uploads # GX::HTTP::Uploads object };
Any value of the result hash may be undef.
GX::HTTP::Parser::Body::MultiPart
GX::HTTP::Parser::Body::URLEncoded
Jörg A. Uzarek <uzarek@runlevelnull.de>
Copyright (c) 2009-2011 Jörg A. Uzarek.
This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.
To install GX, copy and paste the appropriate command in to your terminal.
cpanm
cpanm GX
CPAN shell
perl -MCPAN -e shell install GX
For more information on module installation, please visit the detailed CPAN module installation guide.