Count number of redirections using HTMLUnit -
i using htmlunit track 302 redirection(s). when visit page instance of webclient , 1 or more redirections might involved before landing on url. once do,
mywebclient.setredirectenabled(true);
, can http status code using currentpage.getwebresponse().getstatuscode();
, check if 302. problem how track sequence of redirections total number of redirections before landing on page. idea?
in case still need solution,
com.gargoylesoftware.htmlunit.util.webconnectionwrapper can used keep track of requests , change response (change status code stop further redirects)
Comments
Post a Comment