Returns a response with the specified HTTP status code with an optional message.
The sendStatus()
function is used in the router()
, beforeRouter()
,
and afterRouter()
hooks to return a specified response.
Optionally, you can pass a message.
The HTTP status code to return.
The message to write as the HTTP body.
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.