title: angular2 service request header response for X-Pagination-Page-Count
body: <p><a href="https://i.stack.imgur.com/A8EPl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/A8EPl.png" alt="enter image description here"></a>I am using angular2 service to get data response from yii2 api. In browser network tab it showing all required response but when I am trying to get it directly from component like</p>
  
  <pre><code>response.headers.get('X-Pagination-Page-Count') 
  </code></pre>
  
  <p>Then it's not showing anything. except only showing content-type in response header via code. but can't get a function response. below is my service function.</p>
  
  <pre><code>getResponse(endpointUrl: string): Observable&lt;any&gt; {
  
      const url = url;
  
      return this._http.get(url)
          .catch((err) =&gt; this._handleError(err))
          .take(1)
          .map((res: Response) =&gt; res);
  }
  </code></pre>
  
  <p>this is response image. </p>