Look at the last example (section 3.9) on the page you referenced
(http://hc.apache.org/httpcomponents-client-ga/tutorial/html/statemgmt.html)

You can retrieve the CookieStore later using:

CookieStore store = localContext.getAttribute(ClientContext.COOKIE_STORE);



On 17 April 2012 10:30, tommmmmm <[email protected]> wrote:
> On 17 April 2012 11:28, tommmmmm <[email protected]> wrote:
>
>> How to get cookies that are about to be sent?
>>
>> I read
>> http://hc.apache.org/httpcomponents-client-ga/tutorial/html/statemgmt.html
>> Nothing there. Only how to get cookies from the execution. And I am not
>> interested in that. I want to get cookies before execution.
>>
>> I found some topics on stack overflow but getCookieStore
>>  method simply doesn't exist.
>>
>> Any ideas?
>>
>> --
>> Tomasz P.
>>
>>
> I also found a solution with client.getState().getCookies();
> http://www.java2s.com/Code/Java/Apache-Common/GetCookievalueandsetcookievalue.htm
>
> However the method getState doesn't exist at all....
>
> All the good methods are gone in 4.x ?

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

Reply via email to