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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -