Closed JdKock closed 5 months ago
I suggest using nunjucks syntax keys raw
and endraw
to stop it from tokenising your input using something like this.
{% raw %}your double braced value goes here {{ dontchangeme }}{% endraw %}
@jackkav Thanks! This works now with: "size": {% raw}"{{var-limit}}"{% endraw %}
But what do you suggest to do with the following: "tags": {{#toJson}}var-tags{{/toJson}}
This should be sent to the API as is. I have now this but that don't work:
"tags": {% raw %}{{#toJson}}var-tags{{/toJson}}{% endraw %}
With double quotes it works: {% raw %}"{{#toJson}}var-channel{{/toJson}}"{% endraw %} But than I have "" put around it but I don't want these.
Expected Behavior
For the Elasticsearch API I need to send some json body with Mustache variables. Here a simple example:
This should be sent to the API as is. Elasticsearch replaces the variable "var-limit" with the value from params. In Postman this is no problem what is send is: "size": "{{var-limit}}"
Actual Behavior
In Insomnia the mustache variable is trying to be replaced with a value before the request is send to Elasticsearch. There is no variable var-limit so what is now send is: "size": "NaN".
Reproduction Steps
No response
Is there an existing issue for this?
Additional Information
No response
Insomnia Version
9.0.0
What operating system are you using?
macOS
Operating System Version
macOS 14.4.1
Installation method
homebrew
Last Known Working Insomnia version
No response