gpt4 book ai didi

javascript - 数据未在 axios post 请求中传递

转载 作者:行者123 更新时间:2023-12-03 03:33:15 26 4
gpt4 key购买 nike

我正在使用 axios 调用 post 请求,如下所示:

axios.post(this.api+'&action='+this.action+'&wftkn='+this.wftkn, {name: 'Abcd'}).
then((res)=>{

});

当我检查网络选项卡时,我没有看到请求 header 中传递的数据。在这种情况下会出现什么问题?

enter image description here编辑:添加了控制台错误。

最佳答案

请尝试这个:

axios.post(this.api, { name: 'Abcd' }, {
params: {
action: this.action,
wftkn: this.wftkn,
}
}).then((res)=>{});

关于javascript - 数据未在 axios post 请求中传递,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45990380/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com