Timeout in Pre-request Script?


It is possible to add a timeout on the method pm.sendRequest() please ?

My goal is to start a request (in pre-request script part) before sending the main request. But the goal of the pre-request is to open a server-sent event socket, so I have no response for that.

I tried to achieve something like below :

    url: url,
    method: 'GET',
    timeout: 200

Thank you if you have any idea !

No response to that? As in, is it a protocol upgrade call with persistent connection? In that case, the request handler is not designed for handling the same.

Guess a feature request would be to have something like pm.abort or pm.forceExit or some other api of this nature that can be used to make the script move on. However, it’s not in our roadmap though.