We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amis-editor 表单 post 接口配置请求体 dataType 配置为 json 类型,发送请求时,Content-Type 实际为 application/x-www-form-urlencoded
使用官方编辑器项目,amis-editor-demo,版本为最新版本 repository: https://github.com/aisuda/amis-editor-demo.git commitId: 1b5898b39764b74c5151b89a0755aaebfd42ba23
粘贴有问题的完整 amis schema 代码:
amis schema
{ "type": "form", "title": "表单", "body": [ { "label": "文本框", "type": "input-text", "name": "text" } ], "api": { "method": "post", "url": "http://127.0.0.1:8082/api/create", "dataType": "json" }, "id": "u:56ca5ce96d5f" }
The text was updated successfully, but these errors were encountered:
看起来是 amis-editor-demo 项目下 App.tsx 里,复写 fetcher 配置时出了bug
data 已经被序列化过了,然后三个判断条件都没走,config.headers里没有种上 application/json 的 Content-Type(config.headers['Content-Type'] = 'application/json'; 这句没被执行导致的)
Sorry, something went wrong.
已经修复,
有提交记录吗,麻烦贴一下
wibetter
No branches or pull requests
描述问题:
amis-editor 表单 post 接口配置请求体 dataType 配置为 json 类型,发送请求时,Content-Type 实际为 application/x-www-form-urlencoded
截图或视频:
如何复现(请务必完整填写下面内容):
使用官方编辑器项目,amis-editor-demo,版本为最新版本
repository: https://github.com/aisuda/amis-editor-demo.git
commitId: 1b5898b39764b74c5151b89a0755aaebfd42ba23
粘贴有问题的完整
amis schema
代码:使用最新版 amis-editor-demo,npm start 跑起项目后
1)拖拽一个表单(具体schema配置就是上面👆🏻贴的 schema 代码)
2)右侧操作面板,接口 > 高级配置,发送方式改为 POST,数据格式选择 JSON
3)预览模式,发送请求,Content-Type 实际为 application/x-www-form-urlencoded
4)退出编辑模式,发送请求,结果和预览模式一样
The text was updated successfully, but these errors were encountered: