Here is my code:
List<Cookie> cookies = httpClient.getCookieStore().getCookies();
Obviously, I can loop the cookies
list and generate their String representation.
However, I wonder if it can be done with the Apache HttpClient API directly.
So if cookies
contain the following cookies: [foo=123, bar=123]
, how can I generate the String below with HttpClient API:
"foo=123; bar=123"
The method should take care of domain, path, expiration etc
HttpClient 4.1.1
HttpClient 4.1
HttpClient 4.5