The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

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.

name

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:

path

See GX::HTTP::Cookie.

port

See GX::HTTP::Cookie.

value

See GX::HTTP::Cookie.

version

See GX::HTTP::Cookie.

SEE ALSO

AUTHOR

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

COPYRIGHT AND LICENSE

Copyright (c) 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.