我想问一下关于使用get方法的参数。我的代码大概是这样的:
path = 'https://example.com/api';
const params = new HttpParams();
params.append('http', 'angular');
return this.http.get(path, {params: params});
我原本以为我会有这样的网址:
www.example.com/api?http=angular
但实际上,当我在谷歌浏览器的网络选项卡中检查时,请求的网址为:
www.example.com/api
当我想要路径www.example.com/api?http=angular 时,我该怎么办?
是否有可能在不使用谷歌浏览器的情况下检查所使用方法的请求网址?我的意思是在我使用该方法的服务中。