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


Manual Reference Pages  -  FURL::HEADERS (3)

.ds Aq ’

NAME

Furl::Headers - HTTP Headers object

CONTENTS

SYNOPSIS

CONSTRUCTOR

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



INSTANCE METHODS

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.

SEE ALSO

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


perl v5.20.3 FURL::HEADERS (3) 2016-04-03

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