This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-11-17
Channels
- # beginners (69)
- # calva (25)
- # cider (12)
- # cljdoc (17)
- # cljs-dev (60)
- # clojure (67)
- # clojure-spec (2)
- # clojure-uk (17)
- # clojurescript (46)
- # cloverage (1)
- # code-reviews (6)
- # cursive (3)
- # datascript (8)
- # figwheel-main (1)
- # fulcro (13)
- # hyperfiddle (25)
- # off-topic (7)
- # re-frame (24)
- # reagent (12)
- # reitit (24)
- # ring (8)
- # spacemacs (11)
- # specter (22)
- # tools-deps (7)
- # unrepl (1)
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)