title: angular2 How to store response header data from http.get in extra variable?
body: <p>I'm quite new to Angular 2 and Typescript and want to build a Card-Search App. 
  Basically I have a component where the response data is stored and observed...</p>
  
  <pre><code>this.searchFormGroup.valueChanges
    .debounceTime(200)
    .distinctUntilChanged()
    .switchMap(searchFormGroup =&gt; this.mtgService.getCardsByName(searchFormGroup))
      .subscribe(
        searchResult =&gt; { 
          this.searchResult = searchResult.cards;
        },
        err =&gt; {
          console.log(err);
        });
  </code></pre>
  
  <p>...and a service, which sends the http.get request to the API ...</p>
  
  <pre><code>getCardsByName(searchFormGroup){
     this.params.set(...) ...
  
     return this.http.get(this.nameUrl, { search: this.params })
       .map(res =&gt; res.json())
       .catch((error:any) =&gt; Observable.throw(error.json().error || 'Server error'))}
  </code></pre>
  
  <p>... communicating with each other.</p>
  
  <p>What's the best way to store header-data from the request inside the component? Basically I need the total card-count and paging-links of the request, which are available inside the response header. I've been trying to find a solution to this for hours :o</p>