title: angular2 http request with headers, do not send
body: <p>Quite new to angular2 I try to build a data service and I want to add to each request headers</p>
  
  <p>here is what I try but the headers won't be sent</p>
  
  <pre><code>import { Injectable } from '@angular/core';
  import { Http, Response, Headers } from '@angular/http';
  import 'rxjs/add/operator/map'
  import { Observable } from 'rxjs/Observable';
  import { Configuration } from '../app.constants';
  import { AuthenticationService } from '../services/';
  
  @Injectable()
  export class DataService {
  
      private actionUrl: string;
      private headers: Headers;
      private token;
  
  
      constructor(private _http: Http,
                  private _configuration: Configuration
  
                  //private authenticationService: AuthenticationService
  
      ) {
  
          var currentUser = JSON.parse(localStorage.getItem('currentUser'));
  
          if(currentUser)
              this.token = currentUser.token;
  
          this.actionUrl = _configuration.ServerWithApiUrl + 'patients';
  
          this.headers = new Headers();
  
          this.headers.append('Content-Type', 'application/x-www-form-urlencoded');
          this.headers.append('Accept', 'application/json');
          this.headers.append('Authorization', 'Bearer ' + this.token);
      }
  
      public GetAll = (): Observable&lt;any&gt; =&gt; {
          return this._http.get(this.actionUrl, this.headers).map((response: Response) =&gt; &lt;any&gt;response.json());
      }
  }
  </code></pre>
  
  <p>how to do it properly or why this do not work?</p>