Add curly brace escaping feature
See original GitHub issueDouble curly braces {{ ... }}
are used to inject Insomnia environment variables, but if your payload has a double curly braces pattern, the only way to send this to the upstream is by disabling rendering of the request body. However, that means you can’t use environment variables at all in this payload.
It would be nice to be able to escape Insomnia environment variables so you can use both patterns in one payload.
Issue Analytics
- State:
- Created 3 years ago
- Comments:12 (5 by maintainers)
Top Results From Across the Web
How do I print curly-brace characters in a string while using ...
If you need to include a brace character in the literal text, it can be escaped by doubling: {{ and }} . So...
Read more >How to escape curly brackets? - Zapier Community
I am creating an app which allows templating with the same syntax of merge tags as Zapier, double curly brackets.
Read more >Escape Curly Bracket in Expression
tl;dr Is it possible to escape curly brackets ({}) when doing string manipulation in expressions? I'm trying to build an HTTP request on...
Read more >How to put escaped curly braces inside text - Google Groups
escape sequences inside \text: \& \% \$ \# \_ \{ \}. Note that \$ is already recognized and this change would need only...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for that @inabajunmr! Just tested it myself and it seems to work as well, although Insomnia attempts to add a pill in the UI for
{{ '{{variable}}' }}
and spectacularly fails. The syntax for the raw tag would be{% raw %}{{variable}}{% endraw %}
which is also standard Nunjucks syntax and has special case handling in Insomnia.@iinuwa I will close this issue as resolved because it does seem to work without disabling rendering entirely - anything inside the raw tags will be used raw, and other areas in the same text field can still use environment variables.
Please re-open this issue if it does not cater for your use case!
The following pattern I tested works well also.
ref. https://github.com/mozilla/nunjucks/issues/604#issuecomment-465493535