javascript - 发布请求适用于邮递员,但不适用于 nuxt axios
问题描述
我已经尝试了几次,并在一些类似的问题中寻找最好的结果,但我没有得到任何合理的结果,我得到了邮递员和 js AJAX 的回应,但没有得到 axios 的回应。我的标头请求如下:
:authority: www.sample.com
:method: POST
path: /api/v1/contact
:scheme: https
accept: application/json, text/plain
accept-encoding: gzip, deflate, br
accept-language: en-US,en;q=0.9,fa;q=0.8
content-length: 549
content-type: application/x-www-form-urlencoded
origin: http://localhost:3000
referer: http://localhost:3000/contact-us
sec-fetch-dest: empty
sec-fetch-mode: cors
sec-fetch-site: cross-site
user-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko)
Chrome/83.0.4103.61 Safari/537.36
任何想法?多谢。
解决方案
推荐阅读
- git - 创建新的 GIT 存储库
- associations - Sequelize BelongsToMany 将 foreignKey 设置为 primaryKey
- node.js - 循环中的nodejs fs.rename(如何正确使用promises)
- api - 在 Ionic 3 中使用 tus 将视频上传到 Vimeo
- c# - 绑定 x:Load,更新绑定值不会加载控件 (UWP)
- c# - 如何将磁盘可用空间性能计数器添加到 Azure Application Insights?
- java - 用Java打印二维对象数组?
- javascript - Javascript:不支持属性或方法“hasAttribute”
- c# - 如何根据 C++ 在同一内存位置重新初始化 C# 中的对象(或者它是自动完成的)?
- haskell - 使用来自 hackage 的 SelfOrganizing map som 获取列表列表