I have to send some data using POST to a backend that checks the content type and forces "text/xml". I'm using this code:
final ClientResource resource = new ClientResource(url);
String data = "<?xml version=\"1.0\" encoding=\"UTF-8\"?> ..."
StringRepresentation stringRep = new StringRepresentation(data);
stringRep.setMediaType(MediaType.TEXT_XML);
resource.post(stringRep);
It seems that Restlet uses "text/plain" as content type. Is it possible to force the content type? I'm using Restlet 2.0 on Android 2.2.
Thanks in advance
Steven