I'm trying to call a web server that is using relative URL redirects for some of the calls. This of course isn't working with DefaultHttpClient as it isn't treating it as a relative URL. I've gotten as far as implementing a RedirectHandler in an attempt to catch the redirect and add in the base call but I can't work out how to get the location of the redirect.
With the following method how do I go about finding out where I am being redirected to? I can't find any fields on either response or context that have what I need and I don't know where else to look.
public URI getLocationURI(HttpResponse response, HttpContext context)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…