hello guys
how can i destructing route "/users/:id" [id] how can i include full request too ?
@abdullahibra I'm not I understand what you're asking there. What do mean by "include full request" in that context?
If you have (GET "/users/:id" [id] handler-fn)
then the handler function is still passed the whole Ring request.
[id :as request] ?
(defn handler-fn [req] ...)
It will be passed the Ring request hash map.
(you don't actually need id
in the route parameters, as I recall, so (GET "/users/:id" [] handler-fn)
would also work -- but I tend to list them there for clarity of intent)