Closed sir-farfan closed 1 year ago
The issue you are having is the final redirect to your non-existent endpoint will actually get a connection error
I had to add # @no-redirect
@sir-farfan I log all redirects in history view
And it would also be possible to output them using hook. I haven't created a wrapper for it, but the one provided by got would work.
{{
Object.assign(request.options, {
hooks: {
beforeRedirect: [(options, response) => {
console.info(response);
}]
}
})
}}
GET https://httpbin.org/absolute-redirect/3
I'll give that a try, maybe better than the 3 @no-redirect's I'm using.
Hello I'm trying to get some variables from a redirect output (location header) , currently I copy-paste them, I'm trying to put them in the global object for use in the next request but, for whatever reason, when I get the 302 status, the script never gets executed.
The call has about 3 redirects, at least the first 2 seem to have the code I need, the last one will always be 302 until we implement the callback (not even in the backlog yet).
Is there an event or something I can use to execute on every redirect to extract the information I need?