python - JSON 值无法转换为 System.Int32 python POST
问题描述
我对 python 中的 POST 方法有疑问。
我的代码:
url = "https://blablabla.com"
data = {
"data1": "blalba",
"data2": "12"
}
resp = requests.post(url, json=data)
print(resp.text)
我的输出是:
{"result":false,"data":null,"error":{"httpStatusCode":0,"errorMessages":null,"isError":false},"validationErrors":[{"field":"$.sicno","error":["The JSON value could not be converted to System.Int32. Path: $.sicno | LineNumber: 0 | BytePositionInLine: 18."]}],"isError":true}
我该如何处理?谢谢你。
解决方案
推荐阅读
- keyboard-shortcuts - 将“向上箭头”键绑定到 fzf 命令
- javascript - React Masonry Layout 在渲染带有淡入效果的图像时存在错误
- python - Django Wagtail:是否有任何选项可以禁用 wagtail fieldPanel?
- ruby-on-rails - 使用 Rails 或 Bootstrap 对 HTML 表中的列进行排序?
- asp.net - 错误的“BC30205:预期语句结束。” 在运行时
- reactjs - 如何设置来自 Redux 存储的输入值,但仍然能够写入该输入并更新值?
- javascript - 使用表单中的按钮将变量附加到具有来自其他表单的变量的 url
- html - Visual Studio 代码智能感知没有看到 html 类
- loops - 如何在 Xcode10 中循环 AvAudioPlayerNode
- c# - 从表单 POST 到外部 API