ISpectDioInterceptorSettings class
ISpectDioInterceptor settings and customization.
Constructors
-
ISpectDioInterceptorSettings({bool enabled = true, bool enableRedaction = true, bool printResponseData = true, bool printResponseHeaders = false, bool printResponseMessage = true, bool printErrorData = true, bool printErrorHeaders = true, bool printErrorMessage = true, bool printRequestData = true, bool printRequestHeaders = false, AnsiPen? requestPen, AnsiPen? responsePen, AnsiPen? errorPen, @Deprecated('Use requestChain instead') bool requestFilter(RequestOptions requestOptions)?, @Deprecated('Use responseChain instead') bool responseFilter(Response response)?, @Deprecated('Use errorChain instead') bool errorFilter(DioException response)?, NetworkFilterChain<
RequestOptions> ? requestChain, NetworkFilterChain<Response> ? responseChain, NetworkFilterChain<DioException> ? errorChain}) -
const
Properties
- enabled → bool
-
Enable HTTP request/response logging when
true.finalinherited - enableRedaction → bool
-
Enable sensitive data redaction when
true(default:true).finalinherited -
errorChain
→ NetworkFilterChain<
DioException> ? -
Filter chain for errors. Takes priority over errorFilter.
final
- errorFilter → bool Function(DioException response)?
-
For error filtering.
You can add your custom logic to log only specific Dio errors.
final
- errorPen → AnsiPen?
-
Custom
AnsiPenfor error log console output.finalinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- printErrorData → bool
-
Print error body in the log message.
finalinherited
- printErrorHeaders → bool
-
Print error headers in the log message.
finalinherited
- printErrorMessage → bool
-
Print error status message in the log message.
finalinherited
- printRequestData → bool
-
Print request body in the log message.
finalinherited
- printRequestHeaders → bool
-
Print request headers in the log message.
finalinherited
- printResponseData → bool
-
Print response body in the log message.
finalinherited
- printResponseHeaders → bool
-
Print response headers in the log message.
finalinherited
- printResponseMessage → bool
-
Print response status message in the log message.
finalinherited
-
requestChain
→ NetworkFilterChain<
RequestOptions> ? -
Filter chain for requests. Takes priority over requestFilter.
final
- requestFilter → bool Function(RequestOptions requestOptions)?
-
For request filtering.
You can add your custom logic to log only specific HTTP requests.
final
- requestPen → AnsiPen?
-
Custom
AnsiPenfor request log console output.finalinherited -
responseChain
→ NetworkFilterChain<
Response> ? -
Filter chain for responses. Takes priority over responseFilter.
final
- responseFilter → bool Function(Response response)?
-
For response filtering.
You can add your custom logic to log only specific HTTP responses.
final
- responsePen → AnsiPen?
-
Custom
AnsiPenfor response log console output.finalinherited - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
copyWith(
{bool? enabled, bool? enableRedaction, bool? printResponseData, bool? printResponseHeaders, bool? printResponseMessage, bool? printErrorData, bool? printErrorHeaders, bool? printErrorMessage, bool? printRequestData, bool? printRequestHeaders, AnsiPen? requestPen, AnsiPen? responsePen, AnsiPen? errorPen, bool requestFilter(RequestOptions requestOptions)?, bool responseFilter(Response response)?, bool errorFilter(DioException response)?, NetworkFilterChain< RequestOptions> ? requestChain, NetworkFilterChain<Response> ? responseChain, NetworkFilterChain<DioException> ? errorChain}) → ISpectDioInterceptorSettings - Creates a copy with the given fields replaced.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
shouldProcessError(
DioException value) → bool -
Returns
truewhen the error should be logged. -
shouldProcessRequest(
RequestOptions value) → bool -
Returns
truewhen the request should be logged. -
shouldProcessResponse(
Response value) → bool -
Returns
truewhen the response should be logged. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited