vue.js - Vue Axios 不返回响应
问题描述
我有 vue axios 的问题。
我正在尝试使用 get / put 发送数据,但我无法在服务器端读取它。使用 POST 一切正常,所以我不知道问题是什么。顺便提一句。一切都在 PostMan 中运行。
axios({
method: 'PUT',
url: `http://example.org`,
data: Qs.stringify(data),
}).then(response => (console.log(response.data)))
解决方案
我正在以这种方式使用 axios PUT 并且效果很好..
axios.put("http://example.org", "plaintextbodyorstringifiedmaybe", {headers: {"Content-Type": "text/plain"}}).then(response => (console.log(response.data)))
推荐阅读
- azure - Azure 管道:是否必须在同一分支中拥有 azure 管道和代码
- azure - 如何从 Prometheus 服务器中的 Azure app-insight 获取自定义指标?
- python - 将两个变量放在这样的 if 语句中是什么意思:variable[variable2]?
- python - 如何在条形图上绘制一条垂直线,其日期时间标签只有谨慎的 x 轴刻度位置?
- assembly - 如何在asm中的函数序言之前中断
- azure - Terraform AZ CLI 本地执行命令限制
- javascript - 如何根据单元格值将 Google Sheet 中的数据显示到 Google Web App?
- javascript - 使用 PptxGenJS 向 PowerPoint 幻灯片添加过渡
- python - 在 KeyCloak 中绕过“执行以下操作”?
- facebook - 如何为 Instagram 基本显示 API 实现 Instagram 或 Facebook 登录按钮的继续?