Use a promise in Angular HttpClient Interceptor
问题 Can I use promise within HttpInterceptor ? For example: export class AuthInterceptor implements HttpInterceptor{ this.someService.someFunction() .then((data)=>{ //do something with data and then return next.handle(req); }); } why I need this? because I need to get a token to add to request header before making the request to the server. My interceptor: @Injectable() export class AuthInterceptor implements HttpInterceptor{ constructor(private authService: AuthService){} intercept(req: