OpenPlugin::HttpHeader - Represent the incoming and outgoing HTTP headers for a request


OpenPlugin documentation  | view source Contained in the OpenPlugin distribution.

Index


NAME

Top

OpenPlugin::HttpHeader - Represent the incoming and outgoing HTTP headers for a request

SYNOPSIS

Top

 @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

Top

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

Top

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

Top

None known.

TO DO

Top

See the TO DO section of the <OpenPlugin::Request> plugin.

SEE ALSO

Top

See the individual driver documentation for settings and parameters specific to that driver.

COPYRIGHT

Top

AUTHORS

Top

Eric Andreychek <eric@openthought.net>


OpenPlugin documentation  | view source Contained in the OpenPlugin distribution.