BaseNetworkInterceptorSettings class abstract
Base settings class for network interceptors (Dio, HTTP, etc.).
Contains all common configuration fields shared across network interceptor implementations. Package-specific settings (e.g. filter callbacks) should be added in subclasses.
Supports const construction for compile-time constant defaults.
- Implemented types
Constructors
- BaseNetworkInterceptorSettings({bool enabled = NetworkInterceptorDefaults.enabled, bool enableRedaction = NetworkInterceptorDefaults.enableRedaction, DiagnosticCaptureMode captureMode = NetworkInterceptorDefaults.captureMode, DiagnosticResourceLimits? resourceLimits = NetworkInterceptorDefaults.resourceLimits, bool logRequests = NetworkInterceptorDefaults.logRequests, bool logResponses = NetworkInterceptorDefaults.logResponses, bool printResponseData = NetworkInterceptorDefaults.printResponseData, bool printResponseHeaders = NetworkInterceptorDefaults.printResponseHeaders, bool printResponseMessage = NetworkInterceptorDefaults.printResponseMessage, bool printErrorData = NetworkInterceptorDefaults.printErrorData, bool printErrorHeaders = NetworkInterceptorDefaults.printErrorHeaders, bool printErrorMessage = NetworkInterceptorDefaults.printErrorMessage, bool printRequestData = NetworkInterceptorDefaults.printRequestData, bool printRequestHeaders = NetworkInterceptorDefaults.printRequestHeaders, AnsiPen? requestPen, AnsiPen? responsePen, AnsiPen? errorPen})
-
const
Properties
- captureMode → DiagnosticCaptureMode
-
Controls whether application-defined payload formatters may run.
final
- enabled → bool
-
Enable HTTP request/response logging when
true.final - enableRedaction → bool
-
Enable sensitive data redaction when
true(default:true).final - errorPen → AnsiPen?
-
Custom AnsiPen for error log console output.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRedactionActive → bool
-
Whether this adapter masks values: its own enableRedaction flag
combined with the process-wide ISpectRedaction.enabled switch.
no setter
- logRequests → bool
-
Retain normal request diagnostics.
final
- logResponses → bool
-
Retain normal response diagnostics.
final
- printErrorData → bool
-
Print error body in the log message.
final
- printErrorHeaders → bool
-
Print error headers in the log message.
final
- printErrorMessage → bool
-
Print error status message in the log message.
final
- printRequestData → bool
-
Print request body in the log message.
final
- printRequestHeaders → bool
-
Print request headers in the log message.
final
- printResponseData → bool
-
Print response body in the log message.
final
- printResponseHeaders → bool
-
Print response headers in the log message.
final
- printResponseMessage → bool
-
Print response status message in the log message.
final
- requestPen → AnsiPen?
-
Custom AnsiPen for request log console output.
final
- resourceLimits → DiagnosticResourceLimits?
-
Optional adapter-specific budgets.
nullinherits the logger policy.final - responsePen → AnsiPen?
-
Custom AnsiPen for response log console output.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{bool? enabled, bool? enableRedaction, 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, AnsiPen? requestPen, AnsiPen? responsePen, AnsiPen? errorPen}) → BaseNetworkInterceptorSettings - Creates a copy with the given fields replaced.
-
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