PersistCookieJar class
PersistCookieJar is a cookie manager which implements the standard cookie policy declared in RFC. PersistCookieJar persists the cookies in files, so if the application exit, the cookies always exist unless call delete explicitly.
- Inheritance
-
- Object
- DefaultCookieJar
- PersistCookieJar
Constructors
- PersistCookieJar({String dir = './.cookies/', bool persistSession = true, bool ignoreExpires = false})
-
dir
: where the cookie files saved in, it must be a directory.
Properties
-
domains
→ List<
Map< String, Map< >String, Map< >String, SerializableCookie> > -
no setteroverride
- hashCode → int
-
The hash code for this object.
no setterinherited
- ignoreExpires → bool
-
finalinherited
- persistSession → bool
-
Whether persisting the cookies that without "expires" or "max-age" attribute;
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
delete(
Uri uri, [ ]) → void -
Delete cookies for specified
uri
. This API will delete all cookies for theuri.host
, it will ignored theuri.path
.override -
deleteAll(
) → void -
Delete all cookies files under
dir
directory and clear them out from RAMoverride -
forceInit(
) → void -
loadForRequest(
Uri uri) → 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) → 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