CookieStrategy class

Relies on Dio's CookieJar to attach cookies automatically. No manual header injection needed — the CookieJar intercepts every request.

Use this when your backend sets HttpOnly cookies on login.

Inheritance

Constructors

CookieStrategy()
const

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

apply(RequestOptions options) Future<void>
Attach auth credentials to options before the request is sent.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onUnauthorized() Future<void>
Called when the API layer receives a 401. Use to trigger token refresh or logout in your app provider.
inherited
toString() String
A string representation of this object.
inherited

Operators

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