title: Http post and get request in angular 6
body: <p>In angular 5.2.x for http get and post I had this code:</p>
  
  <pre><code>post(url: string, model: any): Observable&lt;boolean&gt; {
  
  return this.http.post(url, model)
    .map(response =&gt; response)
    .do(data =&gt; console.log(url + ': ' + JSON.stringify(data)))
    .catch(err =&gt; this.handleError(err));
   }
   get(url: string): Observable&lt;any&gt; {
  
  return this.http.get(url)
    .map(response =&gt; response)
    .do(data =&gt;
      console.log(url + ': ' + JSON.stringify(data))
    )
    .catch((error: any) =&gt; Observable.throw(this.handleError(error)));
   }
  </code></pre>
  
  <p>In angular 6 it doesn't work.</p>
  
  <p>How can we make an HTTP post or get request?</p>