Created
July 25, 2017 13:31
-
-
Save danielcrisp/c9b7c995677706e6871edda5f329669d to your computer and use it in GitHub Desktop.
TokenInterceptor.intercept - Async HTTP Interceptors with Angular 4
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
// THIS DOESN'T WORK! | |
intercept (request, next) { | |
this.auth.getUser().then(user => { | |
// ... modify the request here ... | |
next.handle(request); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment