ApiCookieManager class
Connection-scoped persistent cookie manager.
Dio captures every eligible Set-Cookie response and automatically adds
all matching cookies to future requests, including after process restarts.
Constructors
- ApiCookieManager.memory({required Uri baseUri})
-
In-memory cookie jar for tests and non-persistent tooling.
factory
Properties
- baseUri → Uri
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- interceptor → CookieManager
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
all(
{Uri? uri}) → Future< List< Cookie> > -
clearAll(
) → Future< void> -
hasAny(
{Uri? uri}) → Future< bool> -
hasAnyNamed(
Iterable< String> names, {Uri? uri}) → Future<bool> -
mergedHeader(
{required Uri uri, Map< String, String> overrides = const <String, String>{}}) → Future<String?> - Builds a request-only cookie header without persisting the overrides.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
save(
Iterable< Cookie> cookies, {Uri? uri}) → Future<void> -
setValues(
Map< String, String> cookies, {Uri? uri}) → Future<void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
create(
{required String connectionKey, required Uri baseUri}) → Future< ApiCookieManager>