From 8c81c62d46c68c22d685c27fceed628c8d3a6981 Mon Sep 17 00:00:00 2001 From: WilliamKoza Date: Sun, 16 Jul 2017 12:00:40 +0200 Subject: [PATCH] docs: fix HttpClient logging's sample --- aio/content/guide/http.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aio/content/guide/http.md b/aio/content/guide/http.md index 69278330e1..9011cc2161 100644 --- a/aio/content/guide/http.md +++ b/aio/content/guide/http.md @@ -389,12 +389,12 @@ export class TimingInterceptor implements HttpInterceptor { constructor(private auth: AuthService) {} intercept(req: HttpRequest, next: HttpHandler): Observable> { - const elapsed = Date.now(); + const started = Date.now(); return next .handle(req) .do(event => { if (event instanceof HttpResponse) { - const time = Date.now() - started; + const elapsed = Date.now() - started; console.log(`Request for ${req.urlWithParams} took ${elapsed} ms.`); } });