Angular httpclient 不使用绝对 url

Angular httpclient not use absolute url

我使用 Angular 7HttpClient:

import { HttpClient, HttpHeaders, HttpResponse, HttpRequest, HttpParams } from '@angular/common/http';

...

this.http.get(this.appConfigService.apiUrl + url, {headers: this.getHeaders(),  params: urlParams} )

this.appConfigService.apiUrl 包含:https//xxxx-api.eu-west-3.amazonaws.com:80/int/

但是我的 ajax 电话是 http://localhost:4200/https//xxxx-api.eu-west-3.amazonaws.com:80/int/meeting

如何不在url开头使用http://localhost:4200/

您在 https

之后的 url 中缺少一个冒号

https//xxxx-api.eu-west-3.amazonaws.com:80/int/

应该是

https://xxxx-api.eu-west-3.amazonaws.com:80/int/