我知道Postman与Chrome插件的解决方案....
我的Postman与Chrome插件的解决方案在我的mbp上我只是添加这些行也把moment.min.js(或任何javascript文件)作为路径描述
<script type="text/javascript" src="../js/tester/moment.min.js"></script>
在路上
~/Library/Application Support/Google/Chrome/Default/Extensions/fhbjgbiflinjbdggehcddcbncdddomop/5.4.0_0/html/
在一个文件中
tester_sandbox.html
能够在“测试”中使用时刻或
requester.html
能够在“预请求脚本”中使用时刻
但我无法找到Postman Native App保存这些文件路径的位置....
我已经尝试了另一种解决方案,我在google上发现将脚本添加为GlobalVariable然后在“测试”中进行评估,但它仍然不起作用...
任何想法或任何建议......
谢谢
要使用时刻,您需要将此添加到预先请求脚本或测试选项卡的顶部
var moment = require('moment')
然后您可以根据文档使用该模块。
moment().add(2, 'days').format()
或者你需要什么......