enter image description here我发送登录返回的不记名令牌,它工作正常令牌到达但API响应未提供身份验证凭据。
cngwdvgl1#
有同样的问题,通过传递一个普通对象到header属性来解决它!
return this.http.post('/test/hello', formData, { headers: { 'Accept': 'application/json', 'Content-Type': 'application/json', 'Authorization': `Bearer ${token}` }, } );
1条答案
按热度按时间cngwdvgl1#
有同样的问题,通过传递一个普通对象到header属性来解决它!