Say I have a βserviceβ that returns an 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 somehow differently, say 500 (while still returning the same XML document)?
avernet
source share