title: Angular 2 - How do I write a Http get promise in my header?
body: <p>Angular 2 - How do I write a Http get promise?</p>
  
  <p>I'm importing http and want to set the http header with my auth token.
  Then I want to write a http get and put the response into a promise to return to the method that calls it.</p>
  
  <p><strong>So far I have this:</strong></p>
  
  <pre><code> import {Http, Headers} from "angular2/http";
   import {EnvironmentService} from './environmentService';
  
   export class AuthService {
       private environmentService: EnvironmentService;
       private http: Http;
       private header: Headers;
  
       contructor(_environmentService: EnvironmentService, _http: Http, _header: Headers){
           this.environmentService = _environmentService;
           this.http = _http;
  
           this.header.append('Authorization', '1234');  
           this.header.append('Content-Type', 'application/json');      
       }
  
       getSpotifyData = ():Promise&lt;Object&gt; =&gt; {
           return this.http
             .get('http://ws.spotify.com/search/1/track.json?q=foo',             {headers:this.header})
             .map((response) =&gt; {
               return response.json()
             })
             .toPromise();
       }
  
   }
  </code></pre>
  
  <p>Thanks in advance!</p>