Hi,
I'm new to restlet and I'm trying to set query params to a ClientResource
GET. I don't know how to do this, I've been searching in the mailing lists
without any luck.
Is this even possible?
I have this class:
public class TracesResourceTest extends TestCase {
private static final Logger logger = Logger
.getLogger(TracesResourceTest.class);
ClientResource cr = new ClientResource("
http://localhost:8182/tjrm/traces");
TraceDAO dao = new TraceDAODummyImpl();
/*
* (non-Javadoc)
*
* @see junit.framework.TestCase#setUp()
*/
protected void setUp() throws Exception {
super.setUp();
}
/**
* Test method for
* {...@link
net.technisys.monitoring.server.restlet.resources.TracesResource#store(java.util.List)}
* .
*/
public void testStore() {
TracesPostRequest request = new TracesPostRequest();
request.setTraces((List<Trace>) dao.find(0, null));
cr.post(request);
}
/**
* Test method for
* {...@link
net.technisys.monitoring.server.restlet.resources.TracesResource#list(java.lang.String)}
* .
*/
public void testList() {
* // Here I want to set parameters to the get before making the call,
like ?param1=x1¶m2=x2
* List<Trace> traces = cr.get(List.class);
logger.info("Received traces:" + traces);
}
}
Thanks in advance.
--
Alejandro Damián Raiczyk
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2618558