FaultDecision class final
What a fault does to a request, inside the auth layer: wait delay, then fail as a dropped connection (drop), answer status with body without reaching the network, or, with neither, send the request after the delay.
Constructors
- FaultDecision({Duration? delay, int? status, String? body, bool drop = false})
- A fault. Throws an ArgumentError for a status outside 100–599, or for both a drop and a status.
Properties
- body → String?
-
The body to answer status with.
final
- delay → Duration?
-
How long to wait first.
final
- drop → bool
-
Whether to fail as a dropped connection.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → int?
-
The status to answer with, without reaching the network.
final
Methods
-
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