Closed hew999 closed 1 year ago
toOptions
?
await dio.get('https://www.foo.com',
options: options.copyWith(policy: CachePolicy.request).toOptions(),
);
@llfbandit
I want to add specific url cached
_dio.addInterceptor(InterceptorsWrapper(
onRequest: (options, handler) {
if (options.uri.toString().contains('some_endpoint')) {
return handler.next(cachedOptions.toOptions()) **<-----** why i cant use the to request option
}
return handler.next(options);
},
)
No .toReuestOption() methid to call
https://github.com/llfbandit/dio_cache_interceptor/wiki/Handling-cache-with-client-only has been updated to reflect the right process.
I just want to cache specific api end point, however i didnot find out the to request options override method