在Angular 7的标头中传递token_type和access_token?

时间:2019-02-20 11:41:18

标签: angular7

我想知道如何在angular7中实现mapmyindia。 我正在使用OAuth API,但是我不知道在标头中传递token_type和access_token。 I am getting 404 error.

getUserData():Observable<any>{
console.log("lllllllllllllllllllllllllllllllllllll",localStorage.getItem("access_token"))
const httpOptions = {
    headers: new HttpHeaders({
      'Content-Type': 'application/x-www-form-urlencoded',
      "Authorization": localStorage.getItem("access_token"),
      // "token_type":"bearer"
    })
  };

  return this.httpclient.get("", httpOptions);
}

0 个答案:

没有答案