如何在没有任何vue库(axios)的情况下在vue回调中获取http响应头
我想在vuejs的get请求回调中获取http响应头。但我不能用任何图书馆或第三方来做这件事 有一些像axios这样的第三方,但在我的代码中它是不允许使用的如何在没有任何vue库(axios)的情况下在vue回调中获取http响应头,http,vue.js,axios,Http,Vue.js,Axios,我想在vuejs的get请求回调中获取http响应头。但我不能用任何图书馆或第三方来做这件事 有一些像axios这样的第三方,但在我的代码中它是不允许使用的 fetch("YOUR API REQUEST").then((res) => console.log(res.headers); ) .then((data) => console.log(data)) .catch((err)=>console.error(err))
fetch("YOUR API REQUEST").then((res) => console.log(res.headers);
)
.then((data) => console.log(data))
.catch((err)=>console.error(err))