WARNING: The [sjs-3] engine was deprecated, use [sjs-4] instead. See sjs-4: statusCode.

File.prototype.statusCode()

Get/set a file’s statusCode.

Syntax

// Get file.statusCode() uint32 // Set file.statusCode(statusCode uint32) File

Parameters

statusCode uint32

The file’s new statusCode.

Description

Get/set a file’s statusCode. See filesystem specification for more details [TODO: add link].

Note that you should use statusCode 0 for all success responses, including when responding to a HTTP request. When the request is later served by the built-in Boomla webserver, it will convert the 0 success statusCode to the default of the HTTP layer which is 200.

Examples

Default statusCode is 0, meaning OK.

Getting statusCode.

Mimicking a 404 Not Found response.

Subscribe to our newsletter!