Maypole::Headers - Convenience wrapper around HTTP::Headers |
Maypole::Headers - Convenience wrapper around HTTP::Headers
use Maypole::Headers;
$r->headers_out(Maypole::Headers->new); # Note, automatic in Maypole $r->headers_out->set('Content-Base' => 'http://localhost/maypole'); $r->headers_out->push('Set-Cookie' => $cookie->as_string); $r->headers_out->push('Set-Cookie' => $cookie2->as_string);
print $r->headers_out->as_string;
A convenience wrapper around HTTP::Headers
. Additional methods are provided
to make the mutators less repetitive and wordy. For example:
$r->headers_out->header(Content_Base => $r->config->uri_base);
can be written as:
$r->headers_out->set(Content_Base => $r->config->uri_base);
All the standard the HTTP::Headers manpage methods, plus the following:
get($header)
An alias to HTTP::Headers->header
gt
$value, ...)An alias to HTTP::Headers->header
gt
$value)$header
. Previous values are maintained.
An alias to HTTP::Headers->push_header
push
- useful for Apache::Session::Wrapper
support, in CGI mode.
gt
$value)$header
, but only if that header is
currently undefined.
An alias to HTTP::Headers->init_header
An alias to HTTP::Headers->remove_header
field_names()
An alias to HTTP::Headers->header_field_names
Simon Flack
Maypole::Headers - Convenience wrapper around HTTP::Headers |