How do i set HTTPS_PROXY values in a K6 script


If i want to run my script i need to do so with the following command:
HTTPS_PROXY=http://osa0002:XXXX k6 run BDDS_REST_API_SPIKE_600VU.js

How can in include the following HTTPS_PROXY=http://osa0002:XXXX in the script itself and not pass this when i run the script.

Hi @pbains1,
unfortunately at the moment, it isn’t yet supported, we have an open issue with ideas, I invite you to subscribe to it so you can get notifications when we will post new updates for it.

Thanks for your reply. Is this also the case if the proxy is the same for each request?

Yes, it is mostly a general issue regarding setting advanced configuration options for the HTTP client.

1 Like