在端点,我需要生成一个数字(代表电话号码),这就是我在环境变量中使用{{$timestamp}}的原因。
有没有办法在全局变量中存储相同的时间戳?
发布于 2016-10-04 07:04:37
可以使用postman.setGlobalVariable()函数设置全局变量,使用postman.getGlobalVariable()函数检索值。
在您的例子中,它应该是: postman.setGlobalVariable("timeStamp",value);
postman.getGlobalVariable("timeStamp");或者简称为{{timeStamp}}
https://stackoverflow.com/questions/39805457
复制相似问题