PersistCookieJar class

PersistCookieJar is a cookie manager which implements the standard cookie policy declared in RFC. PersistCookieJar persists the cookies in files, if the application exit, the cookies always exist unless user explicitly called delete.

Inheritance

Constructors

PersistCookieJar({bool persistSession = true, bool ignoreExpires = false, Storage? storage, bool deleteHostCookiesWhenLoadFailed = true})
persistSession is whether persisting the cookies that without "expires" or "max-age" attribute. If tbe value is false, the session cookies will be discarded. Otherwise, the session cookies will be persisted.

Properties

deleteHostCookiesWhenLoadFailed bool
final
domainCookies Map<String, Map<String, Map<String, SerializableCookie>>>
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
hostCookies Map<String, Map<String, Map<String, SerializableCookie>>>
no setterinherited
ignoreExpires bool
Whether the CookieJar should ignore expired cookies during saves/loads.
finalinherited
persistSession bool
Whether persisting cookies without "expires" or "max-age" attribute.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage Storage
final

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 files in the storage and the memory.
override
forceInit() Future<void>
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