hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: HttpParams in HttpClient 4.3-alpha1
Date Mon, 11 Feb 2013 13:12:14 GMT
On Mon, 2013-02-11 at 13:45 +0100, Fran├žois-Xavier Bonnet wrote:
> Hello,
> 
> I am currently migrating a project from 4.2.3 to 4.3-alpha1
> 
> For cookies I am using BrowserCompatSpec this way:
> httpRequest.getParams().setParameter(ClientPNames.COOKIE_POLICY, 
> CookiePolicy.BROWSER_COMPATIBILITY);
> 
> But now it looks like this parameter is just ignored.
> 
> I know HttpParams are deprecated and I will fix my code but isn't 4.3 
> version supposed to be compatible with 4.2.3 ?
> 
> Regards,
> Francois-Xavier Bonnet
> 

There is an attribute in RequestConfig that represents a name of cookie
policy to be used during request execution.

http://hc.apache.org/httpcomponents-client-dev/httpclient/apidocs/org/apache/http/client/config/RequestConfig.html#getCookieSpec%28%29

If it has no effect, it is a bug.

There is also a utility class that generates RequestConfig from
HttpParam used internally by HttpClient to provide backward
compatibility for deprecated functionality. It _should_ pick up cookie
spec from HttpParam.

http://hc.apache.org/httpcomponents-client-dev/httpclient/apidocs/org/apache/http/client/params/HttpClientParamConfig.html#getRequestConfig%28org.apache.http.params.HttpParams%29

Oleg



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message