How to read the status from response in angular http?
问题 I am facing some problem in reading the status code from response. I am calling api in service, return this.http.get<string>( this.remoteServer + '/google.com/open', httpOptions); In my controller I have, open() { this.openService.open(this.selected.qrCode) .subscribe( data => { console.log(data); this.toastService.showSuccess('Unlock Successfull', 'success'); } ); } Now I want to read the http statustext, the sample http response I am getting from the above call is. HttpErrorResponse