Hoppscotch Explains How Environment Variable Scopes and Precedence Work
Hoppscotch provides five variable scopes, and when names collide the narrowest scope takes priority, in the order Request, Collection, Predefined, Environment, then Global. Variables are colored by scope in the editor, while a red name signals that no scope yielded a value, often due to a typo, a removed variable, or an inactive environment. Variables are either regular, which sync and are shared in workspaces, or secret, which never sync, are masked, and are excluded from exports. Scripting write targets also differ: pw.env.set writes to the selected environment rather than global, and the experimental hopp API provides explicit global and active targets. The guide recommends setting broad defaults once and overriding them close to where they are used.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in