-
Notifications
You must be signed in to change notification settings - Fork 487
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accept alternative quotes for response predicate test #3317
Comments
Hi @infogulch I think cou can use one line string and multi line string even if they're not body https://hurl.dev/docs/request.html#oneline-string-body
You can try, it may works in predicate |
Unfortunately it doesn't work:
Other variations I tried:
I think backticks would be fine to use instead of single quotes if you want to keep the syntax consistent. Multiline would be nice as well. |
Thanks @infogulch I was pretty sure this could work. I think we'll implement support for single and triple backticks. |
Hi @infogulch on master you can use single backtick string like this:
Regards, |
Awesome, thanks! I will report back after I try it. |
Problem to solve
Sometimes when asserting a response I want to match body or query contents that themselves contain quotes so they must be escaped. This is annoying to do, but also makes it hard to read.
Proposal
It would be nice if hurl could parse strings with alternate quotes so other quote types would not need to be escaped.
Additional context and resources
Example output of what happens if you try to use single quotes in the way I described above today:
Tasks to complete
The text was updated successfully, but these errors were encountered: