LogManagerInterceptor class

Dio网络请求日志拦截器 用于记录HTTP请求和响应的详细信息

Constructors

LogManagerInterceptor({bool requestHeader = true, bool requestBody = true, bool responseHeader = true, bool responseBody = true, bool error = true, bool compact = true, int maxWidth = 90})

Properties

compact → bool
是否使用紧凑模式(超长内容会被截断)
final
error → bool
是否打印错误信息
final
hashCode → int
The hash code for this object.
no setterinherited
maxWidth → int
紧凑模式下的最大显示宽度
final
requestBody → bool
是否打印请求体
final
requestHeader → bool
是否打印请求头
final
responseBody → bool
是否打印响应体
final
responseHeader → bool
是否打印响应头
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

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.
toString() → String
A string representation of this object.
inherited

Operators

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