Core
Framework v2.x
2

getBody #

Available since 2.11.0

Returns the provided request's body.

Arguments #

getBody (def: JSONObject = null): JSONObject
NameTypeDescription
name
string
Parameter name
def
JSONObject
Default value to return if the body is not set

Example #

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