1.10.2. Cookies in Client Mode

On the client side you have to do the following to benefit form session management with cookies:

  TcpIpConnection conn (false, host, port);
  HttpProtocol prot(&conn);

  prot.setAcceptCookies(true);  1

  prot.setClientCookie("cookie-test=123"); 2

  if (prot.hasCookie())
    prot.getCookie(); 3


Enable cookie managent. Otherwise cookies are completely ignored.


Add a cookie to the request if available.


Check for incoming cookie information and store for later re-use.