Remove quotes from String Variables when used in URL/Params
Kyle
Win 11,
Yaak-2024.8.0-beta.2
At the moment, variables are replaced "as-is" with their corresponding value. This means that if you have a string variable and use it in query params or the URL itself, the surrounding quotes are also included in the URL - invalidating it.
Solution:
- :)Treat single and double quoted strings differently. e.g. double removes quotes in URL/params (keeps it for other uses) and single forces quote use in all variable cases
- :) Remove all surrounding quotes in each variable when used in URL/params
- :/ Document that it's not advised to use quoted strings as variables and stringify them when you use them
Unsure whether to class this as a bug or improvement, but it did take a while to figure this behaviour out so it appears as a bug to new users.
Love the app, thank you for your work
Gregory Schier
Can you send a screenshot of what you're trying to do with variables? I'm bit confused because there's no need to surround anything in quotes.
Kyle
Gregory Schier Sure!
It would make better sense if the type of the variable was set at the variable level. Meaning I wouldn't have to surround these in quotes as the variable is hardcoded as a string
test_email: "testEmail@example.com" // proposed
vs
test_email: testEmail@example.com // current
Currently if you were to send a variable in the Body, you'd have to know if it was a string or not to know if it should be surrounded in quotes - meaning navigating back to environment and checking the vals.
Ideally, the variable type is at the environment level. But this does mean auto-correcting quote-surrounded variables in the URL/query params