PendingRequestHandler class

Stores requests that arrived while a token refresh was in progress and either retries or rejects them once the refresh settles.

Constructors

PendingRequestHandler()

Properties

hashCode → int
The hash code for this object.
no setterinherited
hasPending → bool
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

drainWithError(DioException error) → void
Rejects all queued requests with the given error.
enqueue(RequestOptions options, ErrorInterceptorHandler handler) → void
Adds a request to the queue to be retried after a refresh completes.
flush(Dio dio, String token) → void
Retries all queued requests with the new token.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

retry(Dio dio, RequestOptions options, String token) → Future<Response>
Retries a single request with the given token using dio.fetch, which bypasses the interceptor chain to avoid re-entrance.