在Postman请求URL中使用环境变量是否有新的语法? [英] Is there new syntax for using environment variables in Postman request URLs?

查看:200
本文介绍了在Postman请求URL中使用环境变量是否有新的语法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我开始使用Postman以来,我一直在使用所附屏幕快照中的语法,但是最近的更新之一似乎已修正了该错误,或​​者有新语法未在其网站上记录。该变量似乎在请求中被完全忽略。

I have used the syntax in the attached screenshot since I started using Postman, but one of the recent updates seems to have either bugged it out or there is new syntax which is not documented on their website. The variable seems to be completely ignored in the request.

参考问题:在Postman的url参数中使用环境变量

推荐答案

在较新版本的Postman App中,引入了会话的概念,您可以使用该会话会话变量当前(如变量悬停所示))使您可以在本地使用变量,而无需与团队同步。

In the newer versions of the Postman App, the concept of sessions have been introduced using which you can have session variables (current as shown on variable hover) which allow you to work with variables locally without syncing them with your team.

因此,在您的情况下,只需在管理环境中将当前值重置为初始值即可。模态截图仅供参考。

So in your case, you simply need to reset your current values with your initial values in the Manage Environments modal. Screenshot attached for reference.

重置变量用初始值替换当前值

此外,您可以在设置中配置此行为,以决定是否要将当前值保留为初始值自动。截图仅供参考。

Additionally, you can configure this behavior in the settings to decide whether or not you would like to persist your current values to the initial values automatically. Screenshot attached for reference.

自动保留变量值切换

转到社区论坛,以防您对此有其他疑问。

Head over to the community forum in case you have additional queries regarding this.

这篇关于在Postman请求URL中使用环境变量是否有新的语法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆