ISpectDioInterceptor class

Dio HTTP client interceptor that logs requests/responses via the trace API.

Constructors

ISpectDioInterceptor({ISpectLogger? logger, ISpectDioInterceptorSettings settings = const ISpectDioInterceptorSettings(), String? addonId, RedactionService? redactor})

Properties

addonId String?
final
captureMode → DiagnosticCaptureMode
Capture policy for values crossing this interceptor boundary.
no setter
configurableSettings → BaseNetworkInterceptorSettings
The current settings exposed for runtime reconfiguration.
no setter
enableRedaction bool
Whether redaction is enabled for this interceptor.
no setter
hashCode int
The hash code for this object.
no setterinherited
logger → ISpectLogger
The logger instance for network logging.
no setter
redactor → RedactionService
The redaction service for this interceptor.
no setter
resourceLimits → DiagnosticResourceLimits
Resource budgets resolved by the adapter or inherited from logger.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
settings ISpectDioInterceptorSettings
no setter

Methods

applyConfigurableSettings(BaseNetworkInterceptorSettings updated) → void
Applies updated settings. Override alongside configurableSettings.
configure({bool? enabled, DiagnosticCaptureMode? captureMode, DiagnosticResourceLimits? resourceLimits, bool inheritResourceLimits = false, bool? logRequests, bool? logResponses, 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
onError(DioException err, ErrorInterceptorHandler handler) → void
Called when an exception was occurred during the request.
onRequest(RequestOptions options, RequestInterceptorHandler handler) → void
Called when the request is about to be sent.
onResponse(Response response, ResponseInterceptorHandler handler) → void
Called when the response is about to be resolved.
processMapData(Map data, {required bool useRedaction}) Map<String, dynamic>
Processes and redacts a map, ensuring string keys.
inherited
redactDiagnosticText(String value, {required bool useRedaction}) String
Returns bounded diagnostic text, failing closed when redaction fails.
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})
Returns a bounded URL and path using the selected capture policy.
inherited
redactUrlSnapshot(NetworkUriSnapshot snapshot, {required bool useRedaction}) → ({String path, String url})
Redacts a URL snapshot whose provenance was established by its creator.
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