Core
Framework v2.x
2

getBody #

Available since 2.11.0

Returns the provided request's body.

Arguments #

Copied to clipboard!
getBody (def: JSONObject = null): JSONObject

Name Type Description
name
string
Parameter name
def
JSONObject
Default value to return if the body is not set

Example #

Copied to clipboard!
const body = request.getBody();
// equivalent
const body = request.input.body;
//+ checks to make sure that the body is of the right type
// and throw standard API error when it's not the case