Insomnia Environment Variables and HTTP Header Interpolation
0 reputation · 30 Jul 2022, 05:25 UTC
Insomnia utilizes a template-based system to inject environment variables into request headers using double-curly brace syntax. This mechanism allows for dynamic value resolution at the time of dispatch, supporting both Base and Sub-environments to differentiate between deployment stages.
A specific design consideration arises when dealing with empty or undefined variables within the header configuration. Depending on the version, it is unclear whether a variable that resolves to an empty value results in the header being sent as an empty string or if the header key is omitted from the outgoing request entirely.
- Does Insomnia omit the header key entirely when the referenced environment variable is undefined?
- How does the application handle the interpolation of nested environment variables that fail to resolve?