title: Sending and receiving different Types with httpclient.post in Angular
body: <p>I have the requirement to call a web service where I send a POST request with a User object and it returns me a LogToken object.</p>
  
  <p>I can't find how to do this with Angular httpClient as it seems to expect the same type sent and received. If I do the following I get an error:</p>
  
  <pre><code>  public login(user: User): Observable&lt;LoginToken&gt; {
      return this._httpClient.post&lt;User&gt;(this._authenticationServiceUrl, user);
    }
  </code></pre>
  
  <blockquote>
    <p>Error TS2322  Type 'Observable{User}' is not assignable to type
    'Observable{LoginToken}'.</p>
  </blockquote>
  
  <p>As I'm pretty new to this technology I guess I'm doing something wrong but I'm unsure about what. Is it wrong to receive a different type from a POST request?</p>