Q:

Importing Headers class (angular)

I'm learning from this tutorial in order to make an ajax request. It uses a class named Headers but misses an import statement for that.
Injectable()
export class PeopleService{
  private baseUrl: string = 'http://swapi.co/api';
  constructor(private http : Http){
  }

  getAll(): Observable<Person[]>{
    let people$ = this.http
      .get(`${this.baseUrl}/people`, {headers: this.getHeaders()})
      .map(mapPersons);
      return people$;
  }

  private getHeaders(){
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    return headers;
  }

  // other code...
}

Does somebody know where the Headers class is declared in order to import it?

A:

It imports the Headers class declared in the Angular HTTP library:
import { Headers } from '@angular/http';

There is a link in the article that points you to the source code on GitHub.

