HedgingInterceptor class
Opt-in duplicate reads. The first response wins; losing work is canceled. Place authentication before this policy. It only repeats the original URI.
- Implemented types
Constructors
- HedgingInterceptor({Duration delay = const Duration(milliseconds: 300), int maxAttempts = 2})
Properties
- delay → Duration
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- maxAttempts → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
intercept(
HttpRequest request, CancellationToken parent, HttpRequestHandler next) → Future< HttpResponse> -
override
-
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