WLogInterceptor class

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

Constructors

WLogInterceptor({bool request = true, bool requestHeader = true, bool requestBody = true, bool responseHeader = false, bool responseBody = true, bool error = true, bool enableLog = true})
构造函数

Properties

enableLog ↔ bool
是否启用日志
getter/setter pair
error ↔ bool
是否打印错误信息
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
request ↔ bool
是否打印请求信息
getter/setter pair
requestBody ↔ bool
是否打印请求体
getter/setter pair
requestHeader ↔ bool
是否打印请求头
getter/setter pair
responseBody ↔ bool
是否打印响应体
getter/setter pair
responseHeader ↔ bool
是否打印响应头
getter/setter pair
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
错误拦截
onRequest(RequestOptions options, RequestInterceptorHandler handler) → void
请求拦截
onResponse(Response response, ResponseInterceptorHandler handler) → void
响应拦截
toEncodableFallback(dynamic object) → Object
处理 JsonEncoder 无法处理的对象
toString() → String
A string representation of this object.
inherited

Operators

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