Skip to main content

Request extensions

Request.sort()

Returns a Sort object from the query parameter sort in this request or null if this parameter is not present. This should be in the form sort=<field>:<order>, for example sort=name:Asc, sort=createdAt:DESC. The order element is not case-sensitive.

val sort = request.sort()

Request.page()

Returns a Page object from the query parameters from and size, or a Page with the values from the default arguments when one or both these parameters are missing (see Declaration below).

val page = request.page()