2

Hi I am using an Angular 5 interceptor to check if the HttpClient request URL contains query params but it always comes back false even though in Network I see the query param being passed.

import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpParams } from '@angular/common/http';
...

intercept (req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
if (!req.params.has('X-Amz-Algorithm')) {
    do something
} else {}
}

Could someone help me on how to retrieve the query params being used in the HttpRequest. Thank you!

1
  • Did you ever get an answer for this ? Commented Jun 7, 2019 at 6:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.