I'm trying to fetch the actual(redirected) url from the one provided by a url shortener.
Let's take twitter url shortener for example. I'm able to get the response object also parsed it to get the document.
Response response = Jsoup.connect("http://t.co/i5dE1K4vSs")
.followRedirects(true) //to follow redirects
.execute();
Now, considering a single redirect, where to get the final url from? Any method or strategy to achieve this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…