DioService constructor
DioService({
- required Dio dioClient,
- CacheOptions? globalCacheOptions,
- Iterable<
Interceptor> ? interceptors, - HttpClientAdapter? httpClientAdapter,
Implementation
DioService({
required Dio dioClient,
this.globalCacheOptions,
Iterable<Interceptor>? interceptors,
HttpClientAdapter? httpClientAdapter,
}) : _dio = dioClient,
_cancelToken = CancelToken() {
if (interceptors != null) {
_dio.interceptors.addAll(interceptors);
}
if (httpClientAdapter != null) {
_dio.httpClientAdapter = httpClientAdapter;
}
}