【发布时间】:2019-10-19 14:36:51
【问题描述】:
我想在来自 vuejs 的 get 请求的回调中获取 http 响应标头。但是我不能为此使用任何库或第三方。
有一些第三方如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))
【讨论】: