Scroll to navigation

Furl::Headers(3pm) User Contributed Perl Documentation Furl::Headers(3pm)

NAME

Furl::Headers - HTTP Headers object

SYNOPSIS

CONSTRUCTOR

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=/'],
    }
    

INSTANCE METHODS

Get the header value in array.
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.
Gets pairs of keys and values.
Returns keys of headers in array. The return value do not contains duplicated value.
Return the header fields as a formatted MIME header.
These methods are shortcut for popular headers.
$headers->clone();
Returns a copy of this "Furl::Headers" object.

SEE ALSO

HTTP::Headers

2021-05-14 perl v5.40.0