SetCookieHeader class final

A class representing the HTTP Set-Cookie header.

This class manages the parsing and representation of set cookie.

Constructors

SetCookieHeader({required String name, required String value, DateTime? expires, int? maxAge, Uri? domain, Uri? path, bool secure = false, bool httpOnly = false, SameSite? sameSite})
Constructs a Cookie instance with the specified name and value.
SetCookieHeader.parse(String value)
factory

Properties

domain Uri?
The domain that the cookie applies to.
final
expires DateTime?
The time at which the cookie expires.
final
hashCode int
The hash code for this object.
no setteroverride
httpOnly bool
Whether the cookie is only sent in the HTTP request and is not made available to client side scripts.
final
maxAge int?
The number of seconds until the cookie expires. A zero or negative value means the cookie has expired.
final
name String
The name of the cookie.
final
path Uri?
The path within the domain that the cookie applies to.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sameSite SameSite?
Whether the cookie is available from other sites.
final
secure bool
Whether to only send this cookie on secure connections.
final
value String
The value of the cookie.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override

Constants

codec → const HeaderCodec<SetCookieHeader>