Name

SPVM::Mojo::Cookie::Request - HTTP request cookie

Usage

use Mojo::Cookie::Request;

my $cookie = Mojo::Cookie::Request->new;
$cookie->set_name("foo");
$cookie->set_value("bar");
say $cookie->to_string;

Description

Mojo::Cookie::Request class in SPVM is a container for HTTP request cookies, based on RFC 6265.

Super Class

Mojo::Cookie

Class Methods

new

static method new : Mojo::Cookie::Request ();

Creates a new Mojo::Cookie::Request object, and returns it.

Instance Methods

parse

method parse : Mojo::Cookie::Request[] ($string : string);

Parses the string $string into the array of Mojo::Cookie::Request objects, and returns it.

Examples:

my $cookies = Mojo::Cookie::Request->new->parse("f=b; g=a");

to_string

method to_string : string ();

Renders the cookie to a string and returns it.

Examples:

my $str = $cookie->to_string;

See Also

SPVM::Mojolicious

Copyright & License

Copyright (c) 2025 Yuki Kimoto

MIT License