I'm sending a request with HttpClient and I'm unable to parse the response. With http from @angular/http it isn't a problem to call response.json().token but this doesn't exist on HttpClient.
Here my request:
return this.httpClient.post(environment.baseUrl + '/api/authenticate', JSON.stringify({ username: username, password: password }))
.map((response: Response) => {
//response.json() --> leads to an exception
...
the response is: {response = {"token": "abcd...xyz"}}
Is it not possible to use HttpClient for this?