NAME
Net::ICAP::Request - ICAP Request Class
VERSION
$Id$
SYNOPSIS
use Net::ICAP::Request;
use Net::ICAP::Common qw(:req);
$msg = new Net::ICAP::Request;
$rv = $msg->parse($fh);
$method = $msg->method;
$url = $msg->url;
$msg = Net::ICAP::Request->new(
method => ICAP_REQMOD,
url => $url,
headers => {
Host => 'localhost',
},
);
$rv = $msg->method(ICAP_RESPMOD);
$rv = $msg->url($url);
$rv = $msg->generate($fh);
DESCRIPTION
This module provides an ICAP Request class for parsing and generating ICAP requests. Additional methods available to this class are provided (and documented) in Net::ICAP::Message.
SUBROUTINES/METHODS
parse
See Net::ICAP::Message documentation.
generate
See Net::ICAP::Message documentation.
method
$rv = $msg->method($method);
$method = $msg->method;
This method gets or sets the request method. Only valid methods are accepted and must be one of ICAP_REQMOD, ICAP_RESPMOD, or ICAP_OPTIONS. No provision exists at this moment to accept custom methods.
url
$rv = $msg->url($url);
$url = $msg->url;
This method gets or sets the URL the request is going to. No validation is done on the passed value.
sanityCheck
This method performs some basic sanity checks that the internal state has parsed, or can generate, a valid ICAP message. This includes checking for the presence of mandatory headers, but no validation is done on the accompanying values.
This method is used internally by both the parse and generate methods.
DEPENDENCIES
BUGS AND LIMITATIONS
AUTHOR
Arthur Corliss (corliss@digitalmages.com)
LICENSE AND COPYRIGHT
This software is licensed under the same terms as Perl, itself. Please see http://dev.perl.org/licenses/ for more information.
(c) 2012, Arthur Corliss (corliss@digitalmages.com)