RxNetLogAdapterInterceptor class

适配器版本的日志拦截器

与 RxNetLogInterceptor 功能相同,但实现了 AdapterInterceptor 接口 可以与任何适配器一起使用

Implemented types

Constructors

RxNetLogAdapterInterceptor({bool request = true, bool requestHeader = true, bool requestBody = true, bool responseHeader = true, bool responseBody = true, bool error = true, void logPrint(Object object) = log2Console})

Properties

error bool
是否打印错误信息
final
hashCode int
The hash code for this object.
no setterinherited
logPrint → void Function(Object object)
日志打印函数
final
request bool
是否打印请求参数
final
requestBody bool
是否打印请求参数 post
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(AdapterException error, ErrorInterceptorHandler handler) Future<void>
错误拦截
override
onRequest(AdapterRequest request, RequestInterceptorHandler handler) Future<void>
请求拦截
override
onResponse(AdapterResponse response, ResponseInterceptorHandler handler) Future<void>
响应拦截
override
printAll(String msg) → void
printKV(String key, Object v) → void
toString() String
A string representation of this object.
inherited

Operators

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