BaseNetworkInterceptorSettingsBuilder<B extends BaseNetworkInterceptorSettingsBuilder<B, TReq, TRes, TErr>, TReq, TRes, TErr> class abstract

Base builder for network interceptor settings.

Provides all common builder methods (redaction toggles, data/header visibility, pens, environment presets, filters) via a self-referential generic so that subclass methods return the correct builder type for fluent chaining.

Type parameters:

  • B — the concrete builder type (self-referential for fluent chaining)
  • TReq — the type passed to the request filter function
  • TRes — the type passed to the response filter function
  • TErr — the type passed to the error filter function

Subclasses must:

  1. Extend BaseNetworkInterceptorSettingsBuilder<ConcreteBuilder, ...>
  2. Override build to construct the package-specific settings object

Constructors

BaseNetworkInterceptorSettingsBuilder()
Creates a builder with default settings (moderate verbosity).

Properties

enabled bool
getter/setter pair
enableRedaction bool
getter/setter pair
errorChain NetworkFilterChain<TErr>?
getter/setter pair
errorFilter bool Function(TErr)?
getter/setter pair
errorPen AnsiPen?
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
printErrorData bool
getter/setter pair
printErrorHeaders bool
getter/setter pair
printErrorMessage bool
getter/setter pair
printRequestData bool
getter/setter pair
printRequestHeaders bool
getter/setter pair
printResponseData bool
getter/setter pair
printResponseHeaders bool
getter/setter pair
printResponseMessage bool
getter/setter pair
requestChain NetworkFilterChain<TReq>?
getter/setter pair
requestFilter bool Function(TReq)?
getter/setter pair
requestPen AnsiPen?
getter/setter pair
responseChain NetworkFilterChain<TRes>?
getter/setter pair
responseFilter bool Function(TRes)?
getter/setter pair
responsePen AnsiPen?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyDevelopmentDefaults() → void
Applies development preset: all headers, all data, redaction enabled.
applyProductionDefaults() → void
Applies production preset: errors only, redaction enabled.
applyStagingDefaults() → void
Applies staging preset: request data + errors, redaction enabled.
build() BaseNetworkInterceptorSettings
Builds the concrete settings object. Subclasses must override to construct the package-specific settings type.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
withAllData() → B
Enables printing of all data (request, response, error).
withAllHeaders() → B
Enables printing of all headers (request, response, error).
withDisabled() → B
Disables the interceptor.
withEnabled() → B
Enables the interceptor (enabled by default).
withErrorChain(NetworkFilterChain<TErr> chain) → B
Sets a NetworkFilterChain for error filtering.
withErrorData() → B
Enables printing of error data.
withErrorFilter(bool filter(TErr)) → B
Sets a custom error filter callback.
withErrorHeaders() → B
Enables printing of error headers.
withErrorMessage() → B
Enables printing of error messages.
withErrorPen(AnsiPen pen) → B
Sets custom color for error logs.
withErrorsOnly() → B
Configures to log only errors (disables request/response logging).
withoutRedaction() → B
Disables sensitive data redaction (use only in dev/test environments).
withRedaction() → B
Enables sensitive data redaction.
withRequestChain(NetworkFilterChain<TReq> chain) → B
Sets a NetworkFilterChain for request filtering.
withRequestData() → B
Enables printing of request data.
withRequestFilter(bool filter(TReq)) → B
Sets a custom request filter callback.
withRequestHeaders() → B
Enables printing of request headers.
withRequestPen(AnsiPen pen) → B
Sets custom color for request logs.
withResponseChain(NetworkFilterChain<TRes> chain) → B
Sets a NetworkFilterChain for response filtering.
withResponseData() → B
Enables printing of response data.
withResponseFilter(bool filter(TRes)) → B
Sets a custom response filter callback.
withResponseHeaders() → B
Enables printing of response headers.
withResponseMessage() → B
Enables printing of response status messages.
withResponsePen(AnsiPen pen) → B
Sets custom color for response logs.

Operators

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