Reputation: 1049
I'm making a get request using the Restlet api in a java application with this code:
// returns a Representation object
new ClientResponse("http://example.com/page").get();
I want to see the cookies which are sent in response to the get request.
Upvotes: 0
Views: 741
Reputation: 2892
You first need to create the ClientResource object, then get its representation, then the cookies:
ClientResource cr = new ClientResource("http://example.com/page");
Representation result = cr.get();
Series<Cookie> cookies = cr.getCookies();
Upvotes: 1