0
我創建了一個CustomHttpInterceptor
現在我想只要登錄系統的一些信息,如任何信息:的Http攔截器不記錄
@Injectable()
export class CustomHttpInterceptor implements HttpInterceptor {
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
console.log('http intercpeotr', req, next)
return next.handle(req);
}
當然我registred它providers
在app.module
但什麼也沒有記錄我向服務器做了一些請求。
我angular
服務看起來像:
import {Http} from "@angular/http";
getAllWithPaging(params: HttpParams){
return this.http.get(this.url + '/withPaging?' + params.toString());
}