IdempotencyConfig class final
Tuning knobs for idempotencyKeyInterceptor.
Constructors
- IdempotencyConfig({String headerName = idempotencyKeyHeader, String keyGenerator()?, bool includeNoSideEffects = false})
-
Builds a config with defaults: lowercase
idempotency-keyheader, crypto-secure 128-bit hex generator, IDEMPOTENT methods only.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerName → String
-
Header to set. Override only when the server expects a non-standard
name (e.g.
x-idempotency-key).final - includeNoSideEffects → bool
-
When true, set the key on NO_SIDE_EFFECTS methods too. Default false:
methods without side effects are safe to retry without dedup, so the
header would only add noise. Flip on for correlation use cases.
final
- keyGenerator → String Function()?
-
Source of the key value. Defaults to defaultIdempotencyKeyGenerator,
which emits a 128-bit hex string seeded by
Random.secure.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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