簡體   English   中英

axios 發布請求,沒有正文到達沒有標頭的服務器

[英]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.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM