hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Lamprecht" <clampre...@elitemail.org>
Subject Re: Redirect Question
Date Mon, 17 May 2004 22:58:48 GMT
Hi Ed,
     It depends on the content of the page returned.  You can look at the
actual content returned (which should contain the JavaScript), and parse out
the redirect location.  It may look something like this:

self.location.replace("/app/self-registration");

Then you can do a GET or POST (using HttpClient) to the redirect URL (which
may be relative, as in the example above).  Hope this helps.

-Chris

----- Original Message ----- 
From: "ed cole" <edcole1313@yahoo.com>
To: <commons-httpclient-dev@jakarta.apache.org>
Sent: Monday, May 17, 2004 2:20 PM
Subject: Redirect Question


> Hi
>    I have a problem, I'm using HttpClient to connect to a website.  The
> intial page contains a redirect, I think through JavaScript, which spawns
a new
> browser.  I need to get to the ne wbrowser to login.  The initial
HttpClient invocation return a status code 200, I don't even see the
> 3xx redirect code never mind the Response's Location value.
>
>    Any ideas?
>
>
>                                           Thanks
>
>
>
> ---------------------------------
> Do you Yahoo!?
> SBC Yahoo! - Internet access at a great low price.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message