Script > parameter to accept insecure request

Hi

For my future tests, I will need to use an insecure request (using http without ssl), do you know if there is a parameter to add to accept this context during the test.

I will use K6 Cloud

My script will be for the moment the following

import { sleep } from "k6";
import http from "k6/http";
 
export const options = {
  ext: {
    loadimpact: {
      distribution: {
        "amazon:fr:paris": { loadZone: "amazon:fr:paris", percent: 100 },
      },
    },
  },
  userAgent: 'MyProjectUserAgent/1.0',
  stages: [
    { target: 35, duration: "2m" },
    { target: 35, duration: "5m" },
    { target: 70, duration: "2m" },
    { target: 70, duration: "5m" },
    { target: 105, duration: "2m" },
    { target: 105, duration: "5m" },
    { target: 140, duration: "2m" },
    { target: 140, duration: "5m" },
    { target: 175, duration: "2m" },
    { target: 175, duration: "5m" },
    { target: 210, duration: "2m" },
    { target: 210, duration: "5m" },
    { target: 245, duration: "2m" },
    { target: 245, duration: "5m" },
    { target: 280, duration: "2m" },
    { target: 280, duration: "5m" },
    { target: 0, duration: "2m" }
  ],
  thresholds: { http_req_duration: ["p(99)<=2100"] },
};
 
export default function main() {
  let response;
 
  // my domain
  response = http.get(
    "http://new.mydomain.com/"
  );
 
  // Automatically added sleep
  sleep(1);
}

Thank you in advance for your feedback
Regards
Y.K

Hi @qa-airl,
the script you provided, calling an http endpoint (without using TLS), should be able to get a successful response by default without any additional options if the server you are trying to connect accepts an HTTP connection. This should work both locally and in the cloud.
In the case, youā€™re getting any specific errors can you report them here? Otherwise, can you provide more details about your use case, please?