I migrated my Angular 4 service from the old Http to the new HttpClient. A query returning zero 0as an answer returns an observable with null.
Request:
return this.httpClient.get(url, options)
.do(res => console.log('service returns', res)) as Observable<number>;
there will be a console log null, but when I open this request in devtools> Network, I see that the server responded 0.
What am I doing wrong?
source
share