我想使用帖子请求获取访问令牌。
任何人都可以帮助我为什么会这样?
let _httpParams = new HttpParams()
.set("username","username")
.set("password","password")
.set("grant_type","password")
let _httpHeader = new HttpHeaders();
_httpHeader = _httpHeader.append("Content-Type", "application/x-www-form-urlencoded");
_httpHeader = _httpHeader.append("Authorization", "Basic " + btoa("username:password"));
return this._http.post(API_URL+'/oauth/token',{headers: _httpHeader,params: _httpParams})
我总是得到这个结果