1.定义全局变量
postman.setGlobalVariable("createDate",Date.parse(new Date("2019/11/23 10:10:10")));

2.json字符串中引用
"createDate": "{{createDate}}"
本文介绍如何在Postman中设置全局变量,并在JSON字符串中引用这些变量,通过实例演示了设置日期类型的全局变量并将其嵌入到请求体中的过程。
1.定义全局变量
postman.setGlobalVariable("createDate",Date.parse(new Date("2019/11/23 10:10:10")));

2.json字符串中引用
"createDate": "{{createDate}}"
2万+
431
1077

被折叠的 条评论
为什么被折叠?