BaseNetworkInterceptor mixin

Facade mixin combining NetworkLoggerMixin, NetworkRedactionMixin, and NetworkConfigurationMixin for backward compatibility.

Classes using this mixin must also apply the three sub-mixins before it in the with clause:

class MyInterceptor extends SomeBase
    with NetworkLoggerMixin, NetworkRedactionMixin,
         NetworkConfigurationMixin, BaseNetworkInterceptor { ... }

New interceptors can mix in only the sub-mixins they need — e.g. WebSocket can omit NetworkConfigurationMixin.

Superclass constraints

Properties

configurableSettings BaseNetworkInterceptorSettings?
The current settings exposed for runtime reconfiguration.
no setterinherited
enableRedaction bool
Whether redaction is enabled for this interceptor.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
logger ISpectLogger
The logger instance for network logging.
no setterinherited
redactor RedactionService
The redaction service for this interceptor.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

applyConfigurableSettings(BaseNetworkInterceptorSettings updated) → void
Applies updated settings. Override alongside configurableSettings.
inherited
configure({bool? printResponseData, bool? printResponseHeaders, bool? printResponseMessage, bool? printErrorData, bool? printErrorHeaders, bool? printErrorMessage, bool? printRequestData, bool? printRequestHeaders, bool? enableRedaction, AnsiPen? requestPen, AnsiPen? responsePen, AnsiPen? errorPen}) → void
Reconfigures logging options at runtime without replacing the interceptor.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processMapData(Map data, {required bool useRedaction}) Map<String, dynamic>
Processes and redacts a map, ensuring string keys.
inherited
redactUrl(String url, {required bool useRedaction}) String
Redacts query parameter values and userInfo credentials in a URL.
inherited
redactUrlAndPath(Uri uri, {required bool useRedaction}) → ({String path, String url})
Redacts both URL and path from a Uri in one call.
inherited
safeRedact(Object data, {required bool useRedaction}) Object
Applies redaction with error handling: logs a warning and returns a placeholder on failure instead of propagating the exception.
inherited
shouldProcess<T>({required bool enabled, required bool filter(T)?, required T value}) bool
Returns true when the interceptor is enabled and the optional filter either is null or returns true for value.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

asStringMap(Object? value) Map<String, dynamic>?
Alias for NetworkLoggerMixin.asStringMap.
override