skip to Main Content

Can Flutter Dio re-call POST with file upload after token refresh in Interceptor’s onError?

So, I have an interceptor set for api calls. It looks like this: class AuthorizationInterceptor extends Interceptor { @override void onRequest( RequestOptions options, RequestInterceptorHandler handler) async { if (options.headers.containsKey('requiresToken') && options.headers['requiresToken'] == false) { options.headers.remove('requiresToken'); super.onRequest(options, handler); } else {…

VIEW QUESTION
Back To Top
Search