I have short-url
bit.ly/18SuUzJ
that leads to
stackoverflow.com/
Do you know how to get that url using HTTP Request with Java? I added Unirest to maven dependencies and tried sth like:
HttpResponse<String> response = Unirest.get("bit.ly/18SuUzJ").asObject(String.class);
System.out.println(response.getBody());
but I get whole structure of that page, not only url . How to get only url that would work for other bitly short-urls?