How to increase timeout in k6(my api takes more than 1.5 mins to respond)

How to increase timeout in k6(my api takes more than 1.5 mins to respond)
i tried to google it but not getting any proper resolutions
Where can i make the change in my code?

Please help me for this issue

A timeout value can be set as part of the params object for an HTTP request if you need to override the default value of 60s. The value supplied can either be a string, or a numeric value (the numeric value would be interpreted as milliseconds). Not sure whether or not k6 supports setting this test-wide.

Example:

let params = {
  timeout: '120s'
};

let res = http.get('https://k6.io', params);
3 Likes