addInterceptors method
call before need call baseUrl、signSecret、errorHandler、cacheSaver
Implementation
Http addInterceptors([List<Interceptor> values = const []]) {
interceptors.addAll([
CookieInterceptor(),
RequestInterceptor(wsUrl: _wsUrl, cacheReader: _cacheReader),
SignInterceptor(secret: _secret, newSecret: _newSecret),
ErrorInterceptor(errorHandler: _errorHandler),
CacheInterceptor(cacheSaver: _cacheSaver),
LogsInterceptor(isLog: _isLog, cacheSaver: _cacheSaver),
if (_isLog) DioLogInterceptor(),
if (_isLog) CurlLoggerDioInterceptor(printOnSuccess: true),
...values,
]);
return this;
}