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,
        request.getCookies().add("USER", "TESTCOOKIE");
        Response response = c.handle(request);
        Representation rep =  response.getEntity();

View this message in context:
Sent from the Restlet Discuss mailing list archive at


Reply via email to