Net::ICAP::Response - ICAP Response Class
$Id: lib/Net/ICAP/Response.pm, v0.03 $
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);
This module provides an ICAP Response class for parsing and generating ICAP responses. Additional methods available to this class are provided (and documented) in the Net::ICAP::Message manpage.
See the Net::ICAP::Message manpage documentation.
See the Net::ICAP::Message manpage documentation.
$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 the Net::ICAP::Common manpage. No provision exists at this moment to accept additional status codes.
$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.
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.
Arthur Corliss (corliss@digitalmages.com)
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)
Copyright © 1997 - 2016, Arthur Corliss, all rights reserved.