Last active
July 30, 2021 09:20
-
-
Save shiburagi/f3ba03d5a6ad56ce6dcb865b65b823aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:dio/dio.dart'; | |
class AppInteceptor extends Interceptor { | |
@override | |
void onRequest(RequestOptions options, RequestInterceptorHandler handler) { | |
options.headers.addAll({"Authorization": "bearer {{TOKEN}}"}); | |
super.onRequest(options, handler); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment