Cookie

NAME

HTTP::Cookie - HTTP cookie class

SYNOPSIS

use HTTP::Cookie;
my $cookie = HTTP::Cookie.new(:name<test_name>, :value<test_value>);
    say ~$cookie;

DESCRIPTION

This module encapsulates single HTTP Cookie.

METHODS

The following methods are provided:

method new

method new(HTTP::Cookie:, *%params)

A constructor, it takes hash parameters, like:

name:     name of a cookie
    value:    value of a cookie
    secure:   Secure param
    httponly: HttpOnly param
    fields:   hash of fields (field => value)

Example:

my $c = HTTP::Cookie.new(:name<a_cookie>, :value<a_value>, :secure, fields => (a => b));

method Str

method Str(HTTP::Cookie:)

Returns a cookie (as a String) in readable (RFC2109) form.

SEE ALSO

HTTP::Cookies, HTTP::Request, HTTP::Response

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.