GX::HTTP::Request::Cookie

Module Version: 0.2000_01

NAME

GX::HTTP::Request::Cookie - HTTP request cookie class

SYNOPSIS

# Load the class
use GX::HTTP::Request::Cookie;

# Create a new cookie
$cookie = GX::HTTP::Request::Cookie->new(
name => 'Customer',
value => 'Wile E. Coyote',
path => '/acme'
)

# Parse a "Cookie" header
@cookies = GX::HTTP::Request::Cookie->parse(
'$Version="1"; Customer="Wile E. Coyote"; $Path="/acme"'
);

DESCRIPTION

This module provides the GX::HTTP::Request::Cookie class which extends the GX::HTTP::Cookie class.

METHODS

Constructor

new

Returns a new GX::HTTP::Request::Cookie object.

$cookie = GX::HTTP::Request::Cookie->new( %attributes );
Attributes:
  • domain ( string )
  • name ( string )
  • path ( string )
  • port ( string )
  • value ( string )
  • version ( string )
Returns:
Exceptions:

Also see parse().

Public Methods

as_string

Returns a string representation of the cookie, suitable for inclusion in a "Cookie" header.

$string = $cookie->as_string;
Returns:
  • $string ( string )

domain

See GX::HTTP::Cookie.

parse

Parses the value of a "Cookie" header into a list of GX::HTTP::Request::Cookie objects.

@cookies = GX::HTTP::Request::Cookie->parse( $string );
Arguments:
  • $string ( string )
Returns:
Exceptions:

version

See GX::HTTP::Cookie.

AUTHOR

Jörg A. Uzarek <uzarek@runlevelnull.de>

COPYRIGHT AND LICENSE

Copyright © 2009-2011 Jörg A. Uzarek.

This module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License Version 3 as published by the Free Software Foundation.