axios.get('yourUrl') .then(response => { console.log(response); }) .catch(error => { console.log(error); });
axios.get('yourUrl', { headers: { Authorization: 'Bearer ' + token } })
上一篇:Axiosget请求无法返回值的问题在React应用中出现。
下一篇:Axiosget请求无法正常工作,我该怎么办?