title: Angular HttpClient missing response headers
body: <p>I am trying to get into angular lately.
  I have a paginated request.</p>
  <pre class="lang-js prettyprint-override"><code>const myParams = new HttpParams().set('page', page.toString()).set('size', size.toString());
  this.http.get&lt;HttpResponse&lt;User[]&gt;&gt;('https://localhost:8443/user/', {
        headers: new HttpHeaders({ 'Content-Type': 'application/json' }),
        params: myParams,
        observe: 'response'
      }).suscribe((response: HttpResponse&lt;User[]&gt;) =&gt; this.data = response.body);
  </code></pre>
  <p>The total count of elements in the DB is transfered to the Client in the <code>X-Total-Count</code> header. i tried to read it like that:</p>
  <pre class="lang-js prettyprint-override"><code>.suscribe((response: HttpResponse&lt;User[]&gt;) =&gt; {
      this.data = response.body;
      this.totalCount = response.headers.get('X-Total-Count');
  });
  </code></pre>
  <p>But this does not work. It turns out that response.headers only includes a subset of the real http-response-headers.</p>
  <p>this is what the headers object looks like</p>
  <pre class="lang-js prettyprint-override"><code>&quot;headers&quot;: {
      &quot;normalizedNames&quot;: {},
      &quot;lazyUpdate&quot;: null
    }
  </code></pre>
  <p>I am sure that X-Total-Count has been sent. Firefox devtools show it. Could you please tell me how to include it into the response?</p>
  <p><a href="https://i.stack.imgur.com/laUM7.png" rel="noreferrer"><img src="https://i.stack.imgur.com/laUM7.png" alt="enter image description here" /></a></p>
  <p><strong>UPDATE</strong></p>
  <p>This question differs from the one that has been identified as a duplicate in the following way: I have not been asking about how to inspect the full httpResponse. I figured that out on my own. I have been asking about why the <code>headers</code> attribute of the Response is not complete.</p>