title: Angular 2: How to access an HTTP response body?
body: <p>I wrote the following code in Angular 2: </p>
  
  <pre><code>this.http.request('http://thecatapi.com/api/images/get?format=html&amp;results_per_page=10').
        subscribe((res: Response) =&gt; {
          console.log(res);
        })
  </code></pre>
  
  <p>When I print the response I get in console: 
  <a href="https://i.stack.imgur.com/DuZDt.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DuZDt.png" alt="enter image description here"></a></p>
  
  <p>I want to have access in the code to body field in the response. The 'body' field starts with an underscore, which means that it's a private field. When I change it to 'console.log(res._body)' I got an error. </p>
  
  <p>Do you know any getter function that can help me here? </p>