Returned content type - Restlet
- by DutrowLLC
How do you set the content type in Restlet? In this case, I'd like to set the content type to ""text/xml".
I have:
public class SubResource extends ServerResource {
@Get
public Representation get(Representation representation){
setStatus(Status.SUCCESS_OK);
StringRepresentation sr = new StringRepresentation(getSomeXml());
return sr;
}
}
I'm unsure even if it is a value that is set in the Representation, or if it is set from the ServerResource class the same way that the return code is.