DefaultCookieJar class

DefaultCookieJar is a default cookie manager which implements the standard cookie policy declared in RFC.

DefaultCookieJar saves the cookies in the memory, all cookies will be cleared after the app exited.

In order to save cookies into storages, use PersistCookieJar instead.

Implemented types
Implementers

Constructors

DefaultCookieJar({bool ignoreExpires = false})

Properties

domainCookies Map<String, Map<String, Map<String, SerializableCookie>>>
no setter
hashCode int
The hash code for this object.
no setterinherited
hostCookies Map<String, Map<String, Map<String, SerializableCookie>>>
no setter
ignoreExpires bool
Whether the CookieJar should ignore expired cookies during saves/loads.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

delete(Uri uri, [bool withDomainSharedCookie = false]) Future<void>
Delete cookies for specified uri. This API will delete all cookies for the uri.host, it will ignored the uri.path.
override
deleteAll() Future<void>
Delete all cookies stored in the memory.
override
loadForRequest(Uri uri) Future<List<Cookie>>
Load the cookies for specified uri.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
saveFromResponse(Uri uri, List<Cookie> cookies) Future<void>
Save the cookies for specified uri.
override
toString() String
A string representation of this object.
inherited

Operators

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