Created
May 22, 2018 16:40
-
-
Save monkov/a6e8eab1771de5a855941c156fbbdd40 to your computer and use it in GitHub Desktop.
Example of auth interceptor
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
import {Injectable} from "@angular/core"; | |
import {HttpEvent, HttpHandler, HttpRequest, HttpClient} from "@angular/common/http"; | |
import {HttpInterceptor} from "@angular/common/http"; | |
import { Observable } from 'rxjs/Observable'; | |
@Injectable() | |
export class AuthInterceptor implements HttpInterceptor | |
{ | |
constructor(public http: HttpClient) { } | |
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment