axios({
method: 'post',
url: 'myapi',
headers: {'Authorization': Cookies.get('token')},
})
.then((response) => {
this.setState({ data: response.data.recommemdation });
})
.catch(function (response) {
console.log(response);
});
我无法将标头添加到我的请求中,并带有400的api响应 尝试使用标头:{'Authorization':Cookies.get('token')},邮递员响应正常