title: pass sessions saved in cookies with post() automatically angular
body: <p>I have seen a few bug reports on github but couldn't figure out my issue. I have cookies that the server sets. Now during POST method,I want to pass this data back to the server. It is an Observable because response from the server will determine further steps to take. Note that I have no access to the backend but CORS and credentials are set. My current code is:</p>
  
  <pre><code>  public logout () : Observable&lt;any&gt; {
      /*
      Send a clear session request to cbase
      */
      let vm : any = this;
  
      const httpPostOptions =
  {   
      headers:
          new HttpHeaders (
          {   
              "Content-Type": "application/x-www-form-urlencoded"
          }),
      withCredentials: true
  };
  
  
      return new Observable((observer) =&gt; {
  
        vm.http.post(
           Config.syncGatewayLoginStage + 'logout/', httpPostOptions
        ).subscribe(
          data =&gt; {
            observer.next(data);
          },
          err =&gt; { observer.error(err); console.log(err); },
          () =&gt; {
            observer.complete();
          }
        );
      });
  
  
  
    }
  </code></pre>
  
  <p>The server responds with error 500 that the session doesn't exist and of course, I see no session cookies passed to the server in the request header even though I see cookies set.</p>
  
  <p>The server response is:</p>
  
  <pre><code>Access-Control-Allow-Credentials: true
  Access-Control-Allow-Origin: http://localhost:4200
  Connection: keep-alive
  Content-Length: 1406
  Content-Security-Policy: default-src 'self'
  Content-Type: text/html; charset=utf-8
  Date: Wed, 20 Feb 2019 10:09:29 GMT
  Vary: Origin
  X-Content-Type-Options: nosniff
  X-Powered-By: Express
  </code></pre>