Currently users can specify the userAgent that would be used by k6 by default when it makes HTTP requests. I'd be useful if we can generalize that and allow users to specify the default value of any header they want globally. Use cases that I can think of:
Accept-Encoding and Accept-Language headers are pretty much the same for all requests, if you want your test to look like a browser. It might also make some sense to manually set the Connection header as well. --user-agent flag, suggesting instead the usage of --header User-Agent="my-custom-useragent-value", to avoid CLI interface clutter It seems worth it to also allow other request options (https://docs.k6.io/docs/params-k6http) to be specified globally. It'd be especially useful to be able add cookies or to change the global default timeout...
I agree that it would be useful to be able to set defaults for all (or most) request options.
Now I don't think that all of these would also need a cli option. For most it would be enough to be able to specify them in the script.
Being able to set a global timeout would definitely be a good addition.
Most helpful comment
Being able to set a global timeout would definitely be a good addition.