The Angular docs say:
The response body doesn\'t return all the data you may need. Sometimes servers return special headers or status codes to indic
You have to inline the options. See github ticket #18586, entry by alxhub on August 9
2017.
Typescript needs to be able to infer the observe and responseType values statically, in order to choose the correct return type for get(). If you pass in an improperly typed options object, it can't infer the right return type.
login(credentials: Credentials): Observable {
return this.httpClient.post(`${environment.USER_SERVICE_BASE_URL}`,
{'username': credentials.username, 'password': credentials.password}, {
headers: new HttpHeaders({'Content-Type': 'application/json'}),
observe: 'response'
})
.map((res) => ...