Say I have "service" returning a XML document:
function doGet() {
var result = '<result>42</result>';
var output = ContentService.createTextOutput(result);
output.setMimeType(ContentService.MimeType.XML);
return output;
}
By default, the HTTP status code for the response will be 200. How can I set it something different, say 500 (while still returning the same XML document)?