Melvin Mah wrote:
I am currently using HttpClients v3.0.1 and I just
tried writing a class that utilizes a POST method.
This class allows inserting of username and password
for a website (as parameters) such as SCOPUS, Emerald,
etc.. and then once it logs into the website's
database, the page will be redirected to a subpage in
which I can perform my search queries.

For that purpose, I've put in a line -
method.setFollowRedirects

but upon running the program,
I get the message that 'Entity Enclosing Requests'
cannot be redirected without user intervention.

I understand that this is in violation with RFC 2616
but somehow I need to redirect it to a subpage. Any
workarounds behind this obstacle is very much appreciated.
Melvin,

You have to handle POST redirects manually because this requires change of the method type from POST to GET, which HttpClient 3.x cannot do automatically.

For details see the HttpClient Redirects Handling guide:

http://jakarta.apache.org/commons/httpclient/redirects.html

Hope this helps

Oleg

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
---------------------------------------------------------------------
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]

Reply via email to