我试过这个,但对我没有用.我得到了date_creation"的 NULL 值.在数据库(Mysql)中
I tried this one but didnt work for me. I got NULL value of "date_creation" in DB (Mysql)
我使用预请求脚本选项卡将日期保存到变量中:
I used Pre-request script tab to save the date into a variable:
var current_timestamp = new Date();
postman.setEnvironmentVariable("current_timestamp", current_timestamp.toISOString());
{
"rib": "123456789",
"code_client": "3",
"taux":"19",
"decouvert" : "150",
"solde" : "8500",
"date_creation" : "{{current_timestamp}}"
}
您必须选择 Raw 并为请求正文键入 JSON
You have to select Raw and type JSON for request body
您可以通过打开控制台视图查看发送到数据库的内容>显示邮递员控制台
You can check what was send to database by opening console view>show postman console
然后在控制台点击请求>请求正文
and then click the request>request body in the console
WH 显示实际发送到服务器的内容.
WHich shows what was actually send to server.
如果它仍然失败,那么它不是邮递员的问题,而是你的应用程序
If its still failing then its not issue with postman but your application
上一篇:是谷歌驱动器实时API为Android?驱动器、实时、是谷歌、API
下一篇:将类从 2 更改为 1 参数时 Spring POST 400 Bad Request Postman参数、POST、Spring、Request