After some hit and trials by using the following code I am able to retrieve cookies at server side. The documentation of Restlet says ClientResource internally calls Client. Is there a way the same can be achieved using ClientResource by setting some options ?. I want to use ClientResource as most of the code I plan to introduce a change to, uses ClientResource, also all example source code uses ClientResource.
public static void main(String[] args) throws IOException { Client c = new Client(Protocol.HTTP); Request request = new Request(Method.GET, "http://localhost:8080/ActivitiSampleProjectNonSpring/service/hello"); request.getCookies().add("USER", "TESTCOOKIE"); Response response = c.handle(request); Representation rep = response.getEntity(); System.out.println(rep.getText()); } -- View this message in context: http://restlet-discuss.1400322.n2.nabble.com/Cookie-set-in-request-not-received-at-Restlet-servlet-end-tp7579288p7579289.html Sent from the Restlet Discuss mailing list archive at Nabble.com. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3089990