-
-
Save Vanethos/27e60347058c504338c99ddf342c5322 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
dynamic requestInterceptor(RequestOptions options) async { | |
SharedPreferences prefs = await SharedPreferences.getInstance(); | |
var token = prefs.get("token"); | |
options.headers.addAll({"Token": "$token${DateTime.now()}"}); | |
return options; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment