Is there a way to define headers once and reuse them?
Problem to solve
I'd like to define a set of headers and have them used for every request instead of adding them to each request. Can multiple headers be defined as a single variable? Or is there another method to do so?
Proposal
If it's not already available, it would be good to have any way to define headers once. Either at the top of a file or as a cli switch.
Additional context and resources
n/a
Tasks to complete
- [ ] ...
Hi,
Currently no but we could implement --header option from curl:
$ hurl --header a:b test.hurl
Will add a header a to every request of test.hurl.
We could also use it for a particular request in [Options] section to use template:
GET https://...
[Options]
header: {{header_api_key}}: MYKEY
See #1710
That would work. It would also be nice to be able to just define it once in the file and have it apply to all requests