ClientCookie class
Client cookie
Constructors
- ClientCookie(String name, String value, DateTime createdAt, {String? domain, DateTime? expires, bool httpOnly = false, int? maxAge, bool secure = false, String? path})
- ClientCookie.fromMap(String name, String value, DateTime createdAt, Map map)
-
Receives directives as Map
factory
- ClientCookie.fromSetCookie(String cookieItem)
-
Parses one 'set-cookie' item
factory
Properties
- createdAt → DateTime
-
TIme at which cookie was created
final
- domain → String?
-
Cookie domain
final
- expires → DateTime?
-
Cookie expiry date
final
- hasExpired → bool
-
Returns
true
if the cookie has expiredno setter - hashCode → int
-
The hash code for this object.
no setterinherited
- httpOnly → bool
-
Is cookie HTTP only?
final
- maxAge → int?
-
Max age of cookie
final
- name → String
-
Cookie name
final
- path → String?
-
Cookie path
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secure → bool
-
Should the cookie be only sent on secure requests?
final
- setCookie → String
-
Returns a String representation that can be directly written to
'set-cookie' header of server response
no setter
- toReqHeader → String
-
Returns a String representation that can be written directly to
http.Request
'cookie' headerno setter - value → String
-
Value of cookie
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
String representation that is useful for debug printing
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
toSetCookie(
Iterable< ClientCookie> cookies) → String - Returns a String representation that can be directly written to 'set-cookie' header