title: Angular HttpClient return expecting observable<HttpEvent<any> rather than observable<any>
body: <p>I'm getting a compilation error on the return type when using HttpClient. In my function <code>GetPortfolio</code>, I'm expecting the <code>GET</code> call to return the json object of type <code>Observable&lt;Portfolio&gt;</code> but it's giving the error:</p>
  
  <p>Type <code>Observable&lt;HttpEvent&lt;Portfolio&gt;&gt;</code> is not assignable to type <code>Observable&lt;Portfolio&gt;</code>. Type <code>HttpEvent&lt;Portfolio&gt;</code> is not assignable to type <code>Portfolio</code>. Type <code>HttpProgressEvent</code> is not assignable to type <code>Portfolio</code>. Property <code>name</code> is missing in type <code>HttpProgressEvent</code>.</p>
  
  <p>My code:</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { environment } from './environments/environment';
  import { HttpClient, HttpHeaders } from '@angular/common/http';
  import { Observable } from 'rxjs/Observable';
  
  
  export interface Portfolio {
    name: string;
    id: string;
  }
  
  @Injectable()
  export class PortfolioService {
  
      private httpOptions;
  
      apiUrl: string;
  
      constructor(private http: HttpClient) {
        this.apiUrl = environment.apiUrl + "/api/portfolios";
  
        this.httpOptions = {
          headers: new HttpHeaders(
            {
              'Content-Type': 'application/json',
            })   
        };
      }
  
  
      GetPortfolio(portfolioId: string): Observable&lt;Portfolio&gt; {
        return this.http.get&lt;Portfolio&gt;(this.apiUrl + '/${portfolioId}', this.httpOptions);
     }
  
  }
  </code></pre>
  
  <p>From the angular hero tutorial and docs HttpClient requests should expect <code>Observable&lt;any&gt;</code>: <a href="https://angular.io/api/common/http/HttpClient" rel="noreferrer">Angular HttpClient doc</a></p>
  
  <p>So am I doing something wrong? Or should I be setting the return value to <code>Observable&lt;HttpEvent&lt;Portfolio&gt;&gt;</code> ?</p>