I making an HTTP call in pre-request-script, which redirects (302) to another URL.
Postman allows disabling redirection for request fired from UI
I want to stop redirection in pre-request-script or get the request/ response object , i dont see any documentaion for pm.sendRequest , it has only err, response, cookie in callback
pm.sendRequest(options, (err, res, cookie) => {});
I would like to test how the redirection works in pre-request script on my own, so if you don’t mind would you please share an example HTTP URL that you are using?
Hi @taehoshino
It doesn’t work, even if I disable automatic redirects in Settings. res.code == 200 as it is being redirected before this handler executed