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

getRequiredFloatParameter

open static fun getRequiredFloatParameter(request: ServletRequest, name: String): Float

Get a float parameter, throwing an exception if it isn't found or isn't a number.

Parameters

request - current HTTP request

name - the name of the parameter

Exceptions

ServletRequestBindingException - a subclass of ServletException, so it doesn't need to be caught