I have a problem that I cannot understand. My corresponding code
final Builder requestConfigBuilder = RequestConfig.custom(); ... final HttpClientBuilder clientBuilder = HttpClientBuilder.create(); clientBuilder.setDefaultCookieStore(); clientBuilder.setDefaultRequestConfig(requestConfigBuilder.build()); ...
If I use this client, which I receive from my builder, I can see that all the cookies sent in my request are as expected. However, adding a cookie specification, for example:
final Builder requestConfigBuilder = RequestConfig.custom(); ... requestConfigBuilder.setCookieSpec(CookieSpecs.DEFAULT);
I see that no cookies are sent in my request. The result is the same no matter which spec I select from CookieSpecs.
I do not understand or use it incorrectly, why does it not work? Is there any problem setting up another cooking? I need this for future references, so it should stay.
source share