【问题标题】:Convert to string in Postman?在邮递员中转换为字符串?
【发布时间】:2021-11-26 09:10:33
【问题描述】:

在 Postman 中,我使用 {{$randomUUID}} 作为参数,但我需要在请求中将其作为字符串(文本)传递。但是,Postman 中没有转换函数,我找不到任何合适的方法将这个生成的 UUID 转换为字符串。那么,如何在 Postman 中将其转换为字符串并将其作为字符串传递?

我也尝试过"menuId": {{"" + $randomUUID}}, 之类的方法,但不起作用。

【问题讨论】:

  • 还有其他人在使用 Postman 吗?
  • 检查这是否有帮助:community.postman.com/t/… 将 randomUUID 的值转换为 pre-request 中的字符串,然后将其用作参数。

标签: json string postman postman-collection-runner


【解决方案1】:
{

"menuId": "{{$randomUUID}}"

}

你只需要用双引号括起来

【讨论】:

    猜你喜欢
    • 2014-01-10
    • 2019-10-14
    • 1970-01-01
    • 2017-08-21
    • 1970-01-01
    • 1970-01-01
    • 2014-08-10
    • 2020-07-29
    • 2020-02-17
    相关资源
    最近更新 更多