https://kotlinlang.org logo
#http4k
Title
# http4k
r

Razvan

10/15/2020, 12:29 PM
yes inside the contact builder is simple was trying to do that in basic RoutingHttpHandler
If that can help others, for now I went buidling a list of routes or null and filtering the not null ones when calling the routes() function.
Copy code
val appRoutes = listOf(
   if (condition1) Route1() else null,
   if (condition2) Route2() else null,  
)

routes(*appRoutes.filterNotNull().toTypedArray())
10 Views