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

getRequiredIntParameter

open static fun getRequiredIntParameter(request: ServletRequest, name: String): Int

Get an int 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