See Section 3.5 of
http://hc.apache.org/httpcomponents-client-ga/tutorial/html/statemgmt.html

This includes an example setting the 'browser compatibility' cookie
policy in HttpClient 4.x.

Thanks,

Sam


On 20 June 2012 17:02, Yan Cheng CHEOK <[email protected]> wrote:
> Previously, I have the following code in httpclient3
>
>
> // To prevent cookie warnings.
> httpClient.getParams().setParameter("http.protocol.single-cookie-header", 
> true);
> httpClient.getParams().setCookiePolicy(org.apache.commons.httpclient.cookie.CookiePolicy.BROWSER_COMPATIBILITY);
>
>
> I was wondering, what is the equivalent code in httpclient4, as I am getting 
> error in the 2nd line.
>
>
> // To prevent cookie warnings.
> httpClient.getParams().setParameter("http.protocol.single-cookie-header", 
> true);
> // ??? compilation error in this line.
> // org.apache.commons.httpclient cannot be resolved to a variable
> httpClient.getParams().setCookiePolicy(org.apache.commons.httpclient.cookie.CookiePolicy.BROWSER_COMPATIBILITY);
>
>
> Thanks.
>
> ---------------------------------------------------------------------
> 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