Created
December 21, 2017 10:55
-
-
Save maxkoretskyi/3795ac407420bca0fbad5b789624fb45 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
export class HttpInterceptorHandler implements HttpHandler { | |
constructor(private next: HttpHandler, private interceptor: HttpInterceptor) {} | |
handle(req: HttpRequest<any>): Observable<HttpEvent<any>> { | |
// execute an interceptor and pass the reference to the next handler | |
return this.interceptor.intercept(req, this.next); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment