Call a Promise from an Angular HttpInterceptor
问题 I've got an angular HttpInterceptor and I need to call an encryption method that's defined like so: private async encrypt(obj: any): Promise<string> { I'm not sure how to handle this in the HttpInterceptor though: intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { const modified = req.clone({ body: this.encrypt(req.body) }); return next.handle(modified).pipe( I'm not sure how to tie the two of those together so that I can call the encrypt method properly from