'{ headers: Headers; 类型的参数}' 不可分配给参数:Ionic

Argument of type '{ headers: Headers; }' is not assignable to parameter : Ionic

这是我的代码

gettheLinkedinUserDetails(token: string) {
    let headers = new Headers();
    headers.append('Content-Type', 'application/x-www-form-urlencoded');
    headers.append('Authorization','Bearer '+token);
    this.http.get('https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address,picture-url)?format=json',{headers: headers})
    .subscribe(profileData => {
      alert(profileData + 'hii');
    })
  }

我正在使用 using HttpClientModule 并且出现错误

Argument of type '{ headers: Headers; }' is not assignable to parameter of type '{ headers?: HttpHeaders | { [header: string]: string | string[]; }; observe?: "body"; params?: HttpParams | { [param: string]: string | string[]; }; reportProgress?: boolean; responseType?: "json"; withCredentials?: boolean; }'. Types of property 'headers' are incompatible. Type 'Headers' is not assignable to type 'HttpHeaders | { [header: string]: string | string[]; }'. Type 'Headers' is not assignable to type '{ [header: string]: string | string[]; }'. Index signature is missing in type 'Headers'. 我该如何解决这个问题?

使用 HttpHeaders 而不是 @angular/common/http 中的 Headers

gettheLinkedinUserDetails(token: string) {

  let headers: new HttpHeaders(
        { 'Content-Type': 'application/x-www-form-urlencoded' },
        { 'Authorization','Bearer ' + token });
          this.http.get('https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address,picture-url)?format=json',
          {headers: headers})
            .subscribe(profileData => {
                alert(profileData + 'hii');
          });
      }