我想在 vuejs 的 get 请求的回调中获取 http 响应 header 。但是我不能为此使用任何库或第三方。
有一些第三方比如axios,但是在我的代码中不允许使用。
最佳答案
fetch("YOUR API REQUEST").then((res) => console.log(res.headers);
)
.then((data) => console.log(data))
.catch((err)=>console.error(err))
关于http - 如何在没有任何 vuex 库(axios)的情况下在 vue 回调中获取 http 响应 header ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56437530/