Hi,

On Thu, May 23, 2013 at 10:43 PM, jhwallingford <[email protected]> wrote:
> If I use HttpClient to do a HTTP GET request for http://myco.com and the
> server does a 301 (Moved Perm) to http://www.myco.com, how do I get the
> final URL? HttpClient will follow the redirect(s) but when I get the
> onComplete with the result I see know way to get the final URL after all
> redirects. Is there a way to do this?

You can disable the follow of redirects, so that you get the
intermediate response with the Location header and then you have to
manually follow redirects.

Alternatively, you can register a RequestListener and you'll see all
requests that are sent by the HttpClient.

--
Simone Bordet
----
http://cometd.org
http://webtide.com
http://intalio.com
Developer advice, training, services and support
from the Jetty & CometD experts.
Intalio, the modern way to build business applications.
_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to