title: Read response headers from API response - Angular 5 + TypeScript
body: <p>I'm triggering a <code>HTTP</code> request and I'm getting a valid response from it. The response also has a header <code>X-Token</code> that I wish to read. I'm trying the below code to read the headers, however, I get null as a result</p>
  
  <pre><code>this.currentlyExecuting.request = this.http.request(reqParams.type, reqParams.url, {
      body: reqParams.body,
      responseType: 'json',
      observe: 'response'
  }).subscribe(
      (_response: any) =&gt; {
          // Also tried _response.headers.init();
          const header = _response.headers.get('X-Token');
          console.log(header);
          onComplete(_response.body);
       },
      _error =&gt; {
          onComplete({
              code: -1,
              message: Constants.WEBSERVICE_INTERNET_NOT_CONNNECTED
          });
      }
  );
  </code></pre>
  
  <p>The response of the <code>API</code>, when checked in Chrome inspect, shows the header is present.</p>
  
  <p><a href="https://i.stack.imgur.com/HCwZ8.png" rel="noreferrer"><img src="https://i.stack.imgur.com/HCwZ8.png" alt="enter image description here"></a></p>