Sanjay Sharma wrote:
Hi All,
How can I handle 302 redirects in JMeter? I'm aware of the 'Follow
Redirects' checkbox, but it isn't working. There are 3-4 302 requests
followed by a final 200 request. How can I manage this in the script?
I would appreciate the help!
--
Regards,
*Sanjay Sharma*
If JMeter for any reason doesn't handle redirections automatically you
can always extract the redirect URL from the Location header
<https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Location>
The URL can be extracted using suitable Post-Processor, i.e. Regular
Expression Extractor
<https://portal.perforce.com/s/article/Using-RegEx-Regular-Expression-Extractor-with-JMeter-1707509382883>,
once done you can use the JMeter Variable from the Regular Expression
Extractor in the next HTTP Request
<https://jmeter.apache.org/usermanual/component_reference.html#HTTP_Request>
sampler.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@jmeter.apache.org
For additional commands, e-mail: user-h...@jmeter.apache.org