hi, So any news regarding the below? Is there any way to change the Characterset without using the Client API?
Thanks, Chen. > Actually getEntity returns null - the entity exist during the lifecycle of > the server call (the proxy invocation). After the call returns from the > server it is null again. > > I managed to change the character set using this code: > > Request request = new Request(Method.PUT, serverBaseURL + > "/test?method=PUT"); > Representation rep = new StringRepresentation(itemJson); > rep.setCharacterSet(CharacterSet.UTF_8); > rep.setMediaType(MediaType.APPLICATION_JSON); > request.setEntity(rep); > cr.setRequest(request); > > Client client = new Client(Protocol.HTTP); > Response response = client.handle(request); > > But I'm not too happy about it since it's a more "low level" API and not > taking advantage of working with the ClientResource concept and the > annotated Resource Interface. > > Is there any other way that I can get hold of the underlying Representation > without manually creating it? > > Thanks, > Chen. > > > > > > On Fri, Apr 16, 2010 at 10:26, Thierry Boileau < > thierry.boil...@noelios.com> wrote: > >> Hi Chen, >> >> what is the character set of the received entity: >> test.getRequest().getEntity().getCharacterSet(); >> >> Best regards, >> Thierry Boileau >> >> ------------------------------------------------------ >> >> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2584782 >> > > hi Theirry, ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2585817