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

Vojtěch Knyttl

11/19/2020, 7:18 AM
Is there a way to make
Path.string().of("")
optional? When I have
"/events" / Path.of("eventId")
, it says
404
if
eventId
is not given. Also, what would be difference between
.string()
and
.nonEmptyString()
?
d

dave

11/19/2020, 7:35 AM
Path Params can’t be optional if they are trailing- it doesn’t really make sense You can match “foo//bar” is the difference with string vs nonempty
v

Vojtěch Knyttl

11/19/2020, 7:39 AM
I see
thanks
15 Views