Movatterモバイル変換


[0]ホーム

URL:


 / 
Furl-3.14
River stage two • 83 direct dependents • 99 total dependents
/Furl::Headers

NAME

Furl::Headers - HTTP Headers object

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

Module Install Instructions

To install Furl, copy and paste the appropriate command in to your terminal.

cpanm

cpanm Furl

CPAN shell

perl -MCPAN -e shellinstall Furl

For more information on module installation, please visitthe detailed CPAN module installation guide.

Keyboard Shortcuts

Global
sFocus search bar
?Bring up this help dialog
GitHub
gpGo to pull requests
gigo to github issues (only if github is preferred repository)
POD
gaGo to author
gcGo to changes
giGo to issues
gdGo to dist
grGo to repository/SCM
gsGo to source
gbGo to file browse
Search terms
module: (e.g.module:Plugin)
distribution: (e.g.distribution:Dancer auth)
author: (e.g.author:SONGMU Redis)
version: (e.g.version:1.00)

[8]ページ先頭

©2009-2025 Movatter.jp