我正在使用React和Redux构建一个前端应用程序,我正在使用axios来执行我的请求.我想访问响应标题中的所有字段.在我的浏览器中,我可以检查标题,我可以看到我需要的所有字段都存在(例如令牌,uid等等),但是当我打电话时
const request = axios.post(`${ROOT_URL}/auth/sign_in`, props);
request.then((response)=>{
console.log(response.headers);
});
Run Code Online (Sandbox Code Playgroud)
我得到了
Object {content-type: "application/json; charset=utf-8", cache-control: "max-age=0, private, must-revalidate"}
Run Code Online (Sandbox Code Playgroud)
这是我的浏览器网络选项卡,因为您可以看到所有其他字段都存在.
最好成绩.