NAME
OpenPlugin::HttpHeader - Represent the incoming and outgoing HTTP headers for a request
SYNOPSIS
@incoming_headers = $OP->httpheader->get_incoming();
$header_value = $OP->httpheader->get_incoming( 'Content-Type' );
$OP->httpheader->set_outgoing({ 'foo' => 'bar });
$OP->httpheader->send_outgoing();
DESCRIPTION
The HttpHeader plugin offers an interface to retrieve headers sent from the browser to the server, and to send headers back to the browser.
METHODS
set_incoming( $name = $value )>
Sets all incoming parameters. This is normally called only by the particular Header driver, and not by an application.
get_incoming( [ $name ] )
get( [ $name ] )
Called by itself, get_incoming returns a list of header names which the browser sent to us during the last request.
Called with the optional name parameter, get_incoming returns the value for that particular header.
set_outgoing( $key = $value )>
set( $key = $value )>
Set $key
to $value
.
To clear an outgoing header value, use undef
for the value:
$header->set_outgoing( 'Content-Type', undef );
get_outgoing()
Returns a list of outgoing keys and values. A value may be an arrayref. (SEE ABOVE)
send_outgoing()
send()
Sends the outgoing HTTP headers.
This function checks to see if there are any cookies to be sent whenever it is called.
BUGS
None known.
TO DO
See the TO DO section of the <OpenPlugin::Request> plugin.
SEE ALSO
See the individual driver documentation for settings and parameters specific to that driver.
COPYRIGHT
Copyright (c) 2001-2003 Eric Andreychek. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHORS
Eric Andreychek <eric@openthought.net>