api - 颤动的http post请求显示状态码500,尽管它在邮递员中工作
问题描述
**flutter**
正如您在下面的 post 方法代码中看到的,我通过 post API 为 post 传递静态数据,这些数据在 postman 中有效,但在此方法中无效
Future addbuss() async {
var urlpost = "https://jcien.com/api/addBusinessReceived";
var responce = await http.post(urlpost,
headers: {
'Content-Type': 'application/json; charset=UTF-8',
},
body: jsonEncode({
"user": "7",
"ch_id": "1",
"user_from": "9",
"entry_date": "2021-05-31",
"amount": "1234",
"business_type": "new",
"referral_type": "inside",
"remarks": "demoapii",
}));
print(responce.statusCode);
**statusCode**
status code showing error of 500
}
解决方案
推荐阅读
- apache - 从 webhost 移动到本地 Synology 主机后 htaccess 不起作用
- r - 在 R 中,有没有一种方法可以基准测试并估算使用 saveRDS 函数保存 7 GB 对象所需的时间?
- c++ - QtCreator 和 CMake:调试发布版本
- openedge - LPAD 不工作 4gl
- unity3d - Unity3d 在 android 6 上共享屏幕截图和链接错误
- javascript - Outlook WEB 插件执行 getAccessToken 返回状态码 302
- javascript - 隐藏/显示输入字段 asp
- java - 使用 Comparator 时 TreeMap 行为的 Submap()
- android - Android 自定义形状图像裁剪
- c# - 超过 1 个 HttpPost 正在激活