On Sat, 2007-03-24 at 16:29 -0600, Darshak Thakore wrote: > Hi, > I am trying to use the httpclient with a postmethod for performing some > action on a server that I have. Now if the action succeeds the server > usually responds with a 302 message with a TEMPORARY_REDIRECT and the > default behavior of the httpclient is to automatically send a GET to the > new url. I want the httpclient to not do this as I want to > programmatically read the 302 message. I believe according to the RFC, > the client is not supposed to perform a GET without user action but most > clients do. I tried to enable the 'makestrict()' method both on the > httpclient and the postmethod but it still does the same thing. How do I > stop the postmethod and/or the httpclient from automatically doing the > redirect on a 302. > Any help will be appreciated.
Darshak, HttpMethod#setFollowRedirects() is your friend Hope this helps Oleg > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
