分类 "前端" 下的文章
页面加载耗时0.004秒。

正常人使用axios的时候,要获取response中的cookie,正常写法是:

axios.post('xxx.url',params)
.then(res => {
    console.log(res.headers['set-cookie'])
})
.catch(err => {
    console.log(err)
})

但是!你会你发现你得到一个undefined!
惊不惊喜?意不意外?

阅读全文