GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Furl::Headers(3) User Contributed Perl Documentation Furl::Headers(3)

Furl::Headers - HTTP Headers object

my $headers = Furl::Headers->new(\%headers);
The constructor takes one argument. It is a hashref. Every key of hashref must be lower-cased.

The format of the argument is like following:

    +{
        'content-length' => [30],
        'set-cookies'    => ['auth_token=; path=/; expires=Thu, 01 Jan 1970 00:00:00 GMT', '_twitter_sess=JKLJBNBLKSFJBLKSJBLKSJLKJFLSDJFjkDKFUFIOSDUFSDVjOTUzNzUwNTE2%250AZWFiMWRiNDZhMDcwOWEwMWQ5IgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVy%250AOjpGbGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA--d9ce07496a22525bc178jlkhafklsdjflajfl411; domain=.twitter.com; path=/'],
    }
    

my @values = $headers->header($key);
Get the header value in array.
my $values_joined = $headers->header($key);
Get the header value in scalar. This is not a first value of header. This is same as:

    my $values = join(", ", $headers->header($key))
    
$headers->header($key, $val);
$headers->header($key, \@val);
Set the new value of headers.
$headers->remove_header($key);
Delete key from headers.
my @h = $headers->flatten();
Gets pairs of keys and values.
my @keys = $headers->keys();
my @keys = $headers->header_field_names();
Returns keys of headers in array. The return value do not contains duplicated value.
my $str = $headers->as_string();
Return the header fields as a formatted MIME header.
my $val = $headers->referer()
my $val = $headers->expires()
my $val = $headers->last_modified()
my $val = $headers->if_modified_since()
my $val = $headers->content_type()
my $val = $headers->content_length()
my $val = $headers->content_encoding()
These methods are shortcut for popular headers.
$headers->clone();
Returns a copy of this "Furl::Headers" object.

HTTP::Headers
2021-05-13 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.