EventHooks class

Lightweight, multicast request/response callbacks — simpler than the interceptor chain for logging/tracing, and hot-swappable at runtime.

Hooks fire once per client attempt (retry). Internal redirect hops inside the transport are not separately hooked.

Annotations
  • @immutable

Constructors

EventHooks({List<RequestHook> request = const [], List<ResponseHook> response = const []})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
request → List<RequestHook>
final
response → List<ResponseHook>
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({List<RequestHook>? request, List<ResponseHook>? response}) → EventHooks
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