NAME

Mojo::Cookie::Response - HTTP 1.1 Response Cookie Container

SYNOPSIS

    use Mojo::Cookie::Response;

    my $cookie = Mojo::Cookie::Response->new;
    $cookie->name('foo');
    $cookie->value('bar');

    print "$cookie";

DESCRIPTION

Mojo::Cookie::Response is a container for HTTP 1.1 response cookies.

ATTRIBUTES

Mojo::Cookie::Response inherits all attributes from Mojo::Cookie and implements the followign new ones.

comment

    my $comment = $cookie->comment;
    $cookie     = $cookie->comment('test 123');

domain

    my $domain = $cookie->domain;
    $cookie    = $cookie->domain('localhost');

expires

    my $expires = $cookie->expires;
    $cookie     = $cookie->expires(time + 60);

httponly

    my $httponly = $cookie->httponly;
    $cookie      = $cookie->httponly(1);

max_age

    my $max_age = $cookie->max_age;
    $cookie     = $cookie->max_age(60);

port

    my $port = $cookie->port;
    $cookie  = $cookie->port('80 8080');

secure

    my $secure = $cookie->secure;
    $cookie    = $cookie->secure(1);

METHODS

Mojo::Cookie::Response inherits all methods from Mojo::Cookie and implements the following new ones.

parse

    my @cookies = $cookie->parse('f=b; Version=1; Path=/');

to_string

    my $string = $cookie->to_string;

SEE ALSO

Mojolicious, Mojolicious::Book, http://mojolicious.org.