SetResultCode(code) Last updated: 15. May 2024
API only function
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
Name | Type | Description |
---|---|---|
code | number | The 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
Code example (JS)
JS is normal JavaScript either running in the browser or on the Docly™ server.return docly.setResultCode(304);