Function API only Updated 23 Oct 2026
setResultCode(code)
Sets the HTTP result code for the response. This function is used to specify the HTTP status code that should be returned to the client.
Parameters
codenumberrequiredThe HTTP status code to be set for the response. Common values include 200 for OK, 404 for Not Found, and 500 for Internal Server Error.
Returns
Null
Example
Normal JavaScript, running in the browser or on the Docly™ server.
return docly.setResultCode(304);