title: How to read the status from response in angular http?
body: <p>I am facing some problem in reading the status code from response.</p>
  
  <p>I am calling api in service,</p>
  
  <pre><code>return this.http.get&lt;string&gt;( this.remoteServer + '/google.com/open', httpOptions);
  </code></pre>
  
  <p>In my controller I have,</p>
  
  <pre><code>open() {
      this.openService.open(this.selected.qrCode)
      .subscribe(
        data =&gt; {
         console.log(data);
         this.toastService.showSuccess('Unlock Successfull', 'success');
        }
      );
    }
  </code></pre>
  
  <p>Now I want to read the http statustext, </p>
  
  <p>the sample http response I am getting from the above call is.</p>
  
  <blockquote>
    <p>HttpErrorResponse {headers: HttpHeaders, status: 200, statusText:
    "OK", url:
    "<a href="https://google.com/open" rel="noreferrer">https://google.com/open</a>", ok:
    false, …}</p>
  </blockquote>
  
  <p>How to read the status text in the controller.</p>
  
  <p>Please help me</p>