[英]axios post request without body getting to the server without the headers
the request getting to the server without the headers:没有标头的请求到达服务器:
const res = await axios.post(`/api/follow/${props.match.url}`, { headers: { Authorization: `Bearer ${token}`, userId: userId, }, });
anyone knows why?有谁知道为什么?
should just put null in the body place, and it works应该把 null 放在身体的地方,它就可以工作
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.