title: How to get json file from HttpClient?
body: <p>I am trying to get a <code>json</code> file from <code>HttpClient</code>, but I get a error when I add <code>.subscribe</code></p>
  
  <p>imports:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { HttpClient, HttpHeaders, HttpClientModule } from '@angular/common/http';
  import { HttpModule, Request, Response, Headers, Http } from '@angular/http';
  import { Observable } from 'rxjs';
  </code></pre>
  
  <p>My code:</p>
  
  <p><a href="https://i.stack.imgur.com/M1cDG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M1cDG.png" alt="enter image description here"></a></p>
  
  <p>When I add <code>.subscribe</code> (yellow marked in image) I got the following error. What does it mean?</p>
  
  <blockquote>
    <p>Object { _body: error, status: 0, ok: false, statusText: "", headers:
    Object, type: 3, url: null }</p>
  </blockquote>