Open
Description
Problem to solve
I prefer to set the request body from a file to keep IDE's syntax support applicable to the given file type
Unfortunately, the {{variable}}
replacement tokens do not work there
Proposal
Given that some file types may use the double brace for its own purposes, I'd suggest a new option which would opt-in to replace {{foobar}}
as it would when the body was inline in a .hurl
file
Request file:
POST /endpoint
file,body.json;
[Options]
replace-file-variables: true
body.json
:
{
"foo": "{{bar}}"
}
When called like hurl --variable bar=baz
, it should replace the {{bar}}
token in the JSON file before sending the request.
Might also consider a CLI switch --replace-file-variables