How can I disable/ignore default cookie handling of httpclient. I want to do it manually. I want to set a pre-defined cookie header for all http requests.
The latest httpclient (4.5.1) has a method called "disableCookieManagement"
, and it appears this just disables the internal cookie management, not the ability to send or receive cookies, and is working for me-
http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/client/HttpClientBuilder.html#disableCookieManagement()
Set httpclient.setCookieStore(cookieStore);
before you execute your HttpClient
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With