{{$ guid}}在Postman中的用途是什么? [英] What is {{$guid}} used for in Postman?
问题描述
Postman的官方网站上指出Postman有一些动态变量一个>。我的问题是关于:
Postman's official website states that Postman has a few dynamic variables. My question is about:
{{$ guid}}
:添加了v4样式guid
{{$guid}}
: Adds a v4 style guid
{{$$ guid}}
是什么类型的变量?
What kind of variable is {{$guid}}
? How can it be used in test scripts for API requests?
推荐答案
GUID是全局唯一标识符的缩写。 GUID主要用于产生十六进制数字,其组之间用连字符分隔,出于唯一性目的,例如:
GUID is the acronym for "Globally Unique Identifier". A GUID is mainly used to produce hexadecimal digits with groups separated by hyphens for uniqueness purposes, for example:
b3d27f9b-d21d-327c-164e-7fb6776f87b0
b3d27f9b-d21d-327c-164e-7fb6776f87b0
在邮递员中,您可以根据需要使用它生成并向您的api发送随机GUID:
In postman you can use this to generate and send a random GUID to your api as required:
{
"id": "{{$guid}}",
}
在发送时会产生(带有上面的随机示例):
On Send would produce(with the random example above):
{
"id": "b3d27f9b-d21d-327c-164e-7fb6776f87b0",
}
这篇关于{{$ guid}}在Postman中的用途是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!