ISpectDioInterceptor class
Dio http client logger on ISpectLogger base
logger field is current ISpectLogger instance.
Provide your instance if your application used ISpectLogger as default logger
Common ISpectLogger instance will be used by default
Constructors
- ISpectDioInterceptor({ISpectLogger? logger, ISpectDioInterceptorSettings settings = const ISpectDioInterceptorSettings(), String? addonId, RedactionService? redactor})
Properties
- addonId → String?
-
ISpectLogger addon functionality
addon id for create a lot of addons
final
- enableRedaction → bool
-
Indicates whether redaction is enabled for this interceptor.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- logger → ISpectLogger
-
Gets the current logger instance.
no setterinherited
- payload → NetworkPayloadSanitizer
-
Provides helper functions for sanitizing headers and bodies.
no setterinherited
- redactor ↔ RedactionService
-
Gets the current redaction service.
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- settings ↔ ISpectDioInterceptorSettings
-
ISpectDioInterceptorsettings and customization.getter/setter pair
Methods
-
configure(
{bool? printResponseData, bool? printResponseHeaders, bool? printResponseMessage, bool? printErrorData, bool? printErrorHeaders, bool? printErrorMessage, bool? printRequestData, bool? printRequestHeaders, AnsiPen? requestPen, AnsiPen? responsePen, AnsiPen? errorPen, RedactionService? redactor}) → void -
Method to update
settingsof ISpectDioInterceptor -
convertToTypedMap(
Map map) → Map< String, dynamic> -
Converts an untyped Map<dynamic, dynamic> to Map<String, dynamic>.
inherited
-
initializeInterceptor(
{ISpectLogger? logger, RedactionService? redactor}) → void -
Initializes the interceptor with logger and redaction service.
inherited
-
maybeRedact(
Object? data, {required bool useRedaction}) → Object? -
Conditionally redacts data based on redaction setting.
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 correct type.
inherited
-
redactBody(
Object? data, {required bool useRedaction}) → Object? -
Redacts request/response body data.
inherited
-
redactHeaders(
Map< String, dynamic> headers, {required bool useRedaction}) → Map<String, dynamic> -
Redacts HTTP headers according to redaction rules.
inherited
-
redactUrl(
String url, {required bool useRedaction}) → String -
Redacts query parameter values and userInfo credentials in a URL when
redaction is enabled.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited