How to bypass Https request to Http in k6 scripts/

Hello

I want to bypass my https host to http to perform the performance test on my test server. Since with direct web server url i can’t access my application so i want to bypass it to HTTP host

Ex: curl -H “Host: google.co.jp” http://testserverXXXz.prod.jp.local:81/

with this command i can access it on my test server but i want to keep it in my k6 scripts.

Can anyone help me to do this in k6 scripts.

Hi @sudharshan.katha,
you can define headers with the k6’s http client. You can set any header you need for executing your request in the same way you’re doing with the curl command. An example can be found here.

1 Like

@codebien Thanks for the answer issue is resolved with headers. Thank you once again