hurl icon indicating copy to clipboard operation
hurl copied to clipboard

Add variables-file per request in xxx.hurl

Open BillyLiou opened this issue 2 years ago • 3 comments

Problem to solve

I want to use variable_files in hurl(in the file not using parameter after hurl cli) Because when I am developing, I don't want to use "hurl --variables-file api1.hurl" like that can I define variables-file in the hurl file and every time I test just need call "hurl api1.hurl"

Proposal

Add variable-file or variable template in hurl file

Thanks .

BillyLiou avatar Oct 08 '23 07:10 BillyLiou

Hi @BillyLiou, yes, we can "naturally" add the --variable-file option in our [Option] section.

GET http://example.com
[Options]
variables-file api1.hurl

fabricereix avatar Oct 08 '23 09:10 fabricereix

Hi @fabricereix Yes, I found this Options in official website, but it can only set variable but not variables-file sorry, I think I typed wrong file name so made you misunderstand. What I said is vars.env

Can I add "variables-file: vars.env "to point specific vars file? I just tried it, and didn't work.

BillyLiou avatar Oct 08 '23 09:10 BillyLiou

@BillyLiou it's not implement in Hurl yet. @fabricereix said we can easily add this option in a future version of Hurl, so, as of Hurl 4.1.0, you can't use it in [Options] yet.

jcamiel avatar Oct 08 '23 11:10 jcamiel