NAME
Net::ICAP::Response - ICAP Response Class
VERSION
$Id: lib/Net/ICAP/Response.pm, 0.04 2017/04/12 15:54:19 acorliss Exp $
SYNOPSIS
use Net::ICAP::Response;
use Net::ICAP::Common qw(:resp);
$msg = new Net::ICAP::Response;
$rv = $msg->parse($fh);
$method = $msg->status;
$text = $msg->statusText;
$msg = Net::ICAP::Response->new(
status => ICAP_OK,
headers => {
ISTag => 'sasieEcjEO',
},
);
$rv = $msg->status(ICAP_CONTINUE);
$rv = $msg->generate($fh);
DESCRIPTION
This module provides an ICAP Response class for parsing and generating ICAP responses. 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.
status
$rv = $msg->status($status);
$status = $msg->method;
This method gets or sets the response status. Only valid statuses are accepted and must be one listed as a constant in Net::ICAP::Common. No provision exists at this moment to accept additional status codes.
statusText
$text = $msg->statusText;
$text = $msg->statusText($code);
This method returns a text string describing the status code's purpose. IF no code is specified it returns the string associated with the internal status code currently set.
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)