[英]axios post request without body getting to the server without the headers
沒有標頭的請求到達服務器:
const res = await axios.post(`/api/follow/${props.match.url}`, { headers: { Authorization: `Bearer ${token}`, userId: userId, }, });
有誰知道為什么?
應該把 null 放在身體的地方,它就可以工作
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.