I want to define a resource in Compojure as follows:
(ANY "myres/:id" [id] (handler))
and I want: id to be optional (depending on whether the ID is specified, my API will behave differently).
This works fine if I try to access
http:
However, if I try to access
http:
without specifying an identifier, I get 404.
Is there a way for the: id parameter to be optional?
Thank!
source
share