【发布时间】:2021-06-30 00:07:11
【问题描述】:
您好,我正在研究如何使用 JWT 和 axios。我想知道您能否解释一下添加“承载”的意义何在?我是否应该使用“授权”或“x-access-token”名称?
Axios.get(`http://localhost:3001/posts`, {
headers: { 'Authorization': `bearer ${token}` }
}).then((response) => {
console.log(response)
});
【问题讨论】: