On Sat, 2010-07-03 at 23:42 -0700, droidin.net wrote:
> I'm trying to mimic OAuth authentication using HttpClient 4. That requires 2
> calls - first I do GET to obtain the form and then I do POST to get security
> code. GET works just fine - I get the form, no error. If I input GET URL in
> the browser (JS disabled) and submit - everything works, however when I do
> HttpPost using the same instance of HttpClient I was using to execute GET I
> get an error complaining that my cookies are disabled. Indeed if I clear
> cookies in the browser after I execute GET and obtain the form I get the
> same error.
> I was under impression that if I use the same HttpClient for 2 different
> calls (GET & POST) it will retain the cookies. Am I wrong?

As long as the same cookie store instance is used for logically related
requests they should share the same logical session and cookies.

You can easily see what cookies are received by the client and sent back
to the origin server by turning on the wire / context logging.

Oleg 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to