Hi Mike,
This should do the trick.
RequestConfig config =
RequestConfig.custom().setCookieSpec(CookieSpecs.IGNORE_COOKIES).build();
HttpUriRequest request =
RequestBuilder.get().setUri(url).setConfig(config).build();
- Arul
On Sun, Nov 24, 2013 at 1:41 PM, Mike Wertheim <[email protected]> wrote:
> I'm upgrading to from version 4.2.5 of HttpClient to version 4.3.1.
>
> My code has these 2 lines:
> final Request request = Request.Get(url);
> request.config(ClientPNames.COOKIE_POLICY, CookiePolicy.IGNORE_COOKIES);
>
> Since request.config is now deprecated, what should I replace that second
> line with?
>
> I see that version 4.3 provides a new class
> called org.apache.http.client.config.CookieSpecs. The class's javadoc
> indicates that this is probably the right class to use, but I don't see any
> documentation that describes how to use it or examples that show how to use
> it.
>