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

Deprecate multiline string attributes #3622

Open
jcamiel opened this issue Jan 21, 2025 · 0 comments
Open

Deprecate multiline string attributes #3622

jcamiel opened this issue Jan 21, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jcamiel
Copy link
Collaborator

jcamiel commented Jan 21, 2025

Multilines string in Hurl can take two "attributes" escape novariable. By default, multiline string doesn't escape ("\t" is a two char) and interpolate variables.

The attributes are parsed, but I'm not sure we've implemented them (there is no integration tests that used them it if I'm not mistaken). There is no mention of these attributes on the doc https://hurl.dev also.

A "normal" multlinestring:

POST https://foo.com
```
toto tutu titi
```

escape attribute \t, \n etc... are replaced by a real tab, a newline etc....

POST https://foo.com
```escape
toto tutu titi
```

A novariable attribute:

POST https://foo.com
```novariable
toto tutu titi
```

Both attributes can be combined:

POST https://foo.com
```novariable,escape
toto tutu titi
```

And the attributes can be used on a JSON multiline string:

POST https://foo.com
POST https://example.org/api/dogs
```json,escape,novariable
{
    "id": 0,
    "name": "Frieda"
}
```

Related, there is a proposal #1733 to support "raw" multilines string (with no variable interpolation):

POST https://foo.com
```raw
toto tutu titi
```

@fabricereix @lepapareil I'm proposing to deprecate/remove both attributes escape/novariable. If we don't want variable, we can use raw string. I'm not sure if we need the really need the escape attribute.

@jcamiel jcamiel added the enhancement New feature or request label Jan 21, 2025
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