Le 29.12.2009 17:52, webp...@tigris.org a écrit : Hello, I've just tried, and it works for me with the internam client connector: using ClientResource ClientResource r = new ClientResource("http://localhost:8182/hello"); r.getRequest().setDate(new Date()); r.get(); or directly the Client connector: Client c = new Client(Protocol.HTTP); Request request = new Request(Method.GET, "http://localhost:8182/hello"); request.setDate(new Date()); c.handle(request);
What kind of client connector are you using? Best regards and happy new year, Thierry Boileau > Hi Guys, > > I'm having trouble setting the header date when using the restlet client. > > I thought it was just a simple matter of setting the request's date.. i.e. > > // Set the request date > request.setDate(cal.getTime()); > > but that didnt seem to work. > > Neither does: > > extraHeaders.add(HttpConstants.HEADER_DATE , DateUtils.format(cal.getTime(), > DateUtils.FORMAT_RFC_1123.get(0))); > > which the current reslet implementation (currently using m6) prohibits. Could > someone give me a clue as to what i'm doing wrong? > > Regards, > --KD > > ------------------------------------------------------ > http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2433641 > > ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2434546