CookieManager class
A minimal in-memory cookie jar shared across all FlutterApiCraft calls.
When ApiCookies.enableCookieJar is true, the manager:
- Stores
Set-Cookievalues from response headers, keyed by domain. - Injects a
Cookieheader into subsequent requests to the same domain.
Cookies are stored only in memory and are lost when the app process ends.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
buildCookieHeader(
String domain, ApiCookies? config, Map< String, String> ? extras) → String? -
Builds the
Cookieheader value fordomain. -
clearCookies(
[String? domain]) → void -
Clears cookies for
domain, or clears the entire jar whendomainisnull. -
handleResponseCookies(
String domain, Map< String, String> responseHeaders, ApiCookies? config) → void -
Reads
Set-CookiefromresponseHeadersand persists the cookies fordomain, unlessconfig.disableCookiePersistenceistrue. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
storeCookies(
String domain, String setCookieHeader) → void -
Parses
setCookieHeaderand stores the resulting name/value pairs underdomain. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → CookieManager
-
The singleton instance.
final