spring-framework / org.springframework.web.bind / ServletRequestUtils / getBooleanParameters

getBooleanParameters

open static fun getBooleanParameters(request: ServletRequest, name: String): BooleanArray

Get an array of boolean parameters, return an empty array if not found.

Accepts "true", "on", "yes" (any case) and "1" as values for true; treats every other non-empty value as false (i.e. parses leniently).

Parameters

request - current HTTP request

name - the name of the parameter with multiple possible values