At the moment, when producing a response in the XML format, strong-remoting always wrap the response body in <response> element (source code).
We should allow developers to customise the name of this root element, for example to produce a response body like this:
A possible solution is to implement a new remoting setting at the shared-method level:
var fn = function(cb) {
cb(null, 'bar');
};
setupRemoting(fn, {
"accepts": [],
"returns": { "type": "string", "root": true },
"xml": { "rootElement": "myCustomName" } }
});
At the moment, when producing a response in the XML format, strong-remoting always wrap the response body in
<response>element (source code).We should allow developers to customise the name of this root element, for example to produce a response body like this:
A possible solution is to implement a new remoting setting at the shared-method level: