leonhardt
09/15/2023, 7:29 PMleonhardt
09/15/2023, 7:30 PMleonhardt
09/15/2023, 8:01 PMorg.http4k.routing.queries
function in that documentation page's Code section example. This appears to work:
val queryParameterMatchingRoutes = routes(
"my/path" bind Method.GET to routes(
queries("myQueryParameter") bind { _ -> Response(Status.OK) }
)
)
I'm finding the required nesting of the routes
function to achieve this a little unintuitive. I was expecting something like this to be possible:
routes(
"my/path" bind Method.GET and queries("myQueryParameter") to { _ -> Response(Status.OK) }
)
Anything I'm missing or is the first example above as succinct as it gets?dave
09/15/2023, 9:32 PMdave
09/15/2023, 9:32 PMleonhardt
09/15/2023, 10:56 PM