When I make a request to mydomain/request
, it should return a JSON string such as "accepted"
or "declined"
.
In my Angular application, I have a function to get this string:
getStatus(jobOfferId): Promise<string> {
const url = "someurl";
return this.httpClientService.get(url)
.toPromise()
.then(response => response as string);
}
This code was working fine in Angular 2, but after upgrading to Angular 4, the same request now throws an error.
The error message is:
"Http failure during parsing for https://mydomain/request"