Skip to content
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

Support multiline variables in Options #3211

Open
alturkovic opened this issue Sep 3, 2024 · 0 comments
Open

Support multiline variables in Options #3211

alturkovic opened this issue Sep 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@alturkovic
Copy link

Problem to solve

I am trying to use a JSON variable in the [Options] section. The only way to do this currently is to use a compacted version. It would be nice to be able to use a multiline variable for readability.

Proposal

Allow multiline variables similar how the body is defined.

Here is a concrete example of what I am trying to do:

GET http://localhost:8080/default
[Options]
variable: new-value=```json
{
  "key": "value
}
```
HTTP 200
[Captures]
default-value: body
[Asserts]
body != {{new-value}}

PUT http://localhost:8080/default
{{new-value}}
HTTP 200

I am trying to change the defaults of a certain endpoint only if they are different than the value I am trying to update them to. This type of a check would also probably need a better equality check (compare JSON equality, not string), but that is for another discussion.

@alturkovic alturkovic added the enhancement New feature or request label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant