您好我正在使用Angular 5拦截器检查HttpClient请求URL是否包含查询参数但是它总是返回false,即使在网络中我看到传递的查询参数。
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 {}
}
有人可以帮我解决如何检索HttpRequest中使用的查询参数。谢谢!