[英]How can I submit the same GUID multiple times in a Visual Studio Code REST Client request
When I need to use the same GUID in several instances - eg HTTP Header and Body - how can I achieve this?当我需要在多个实例中使用相同的 GUID(例如 HTTP 标头和正文)时,我该如何实现呢?
Doing it like this generates multiple GUIDs:这样做会生成多个 GUID:
...
###
POST https://host.acme.com/someapi
Content-Type: application/json; charset=UTF-8
Correlation-Id: {{$guid}}
{
"CorrelationId": "{{$guid}}",
"Record": [
...
This can be achieved by defining and using a variable这可以通过定义和使用变量来实现
...
###
@corrid = {{$guid}}
POST https://host.acme.com/someapi
Content-Type: application/json; charset=UTF-8
Correlation-Id: {{corrid}}
{
"CorrelationId": "{{corrid}}",
"Record": [
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.