ring

abdullahibra 2018-11-17T20:05:23.002600Z

hello guys

abdullahibra 2018-11-17T20:05:52.003300Z

how can i destructing route "/users/:id" [id] how can i include full request too ?

seancorfield 2018-11-17T22:58:18.004300Z

@abdullahibra I'm not I understand what you're asking there. What do mean by "include full request" in that context?

seancorfield 2018-11-17T22:59:47.005500Z

If you have (GET "/users/:id" [id] handler-fn) then the handler function is still passed the whole Ring request.

abdullahibra 2018-11-17T23:06:36.005700Z

[id :as request] ?

seancorfield 2018-11-17T23:08:45.006300Z

(defn handler-fn [req] ...)

seancorfield 2018-11-17T23:08:55.006600Z

It will be passed the Ring request hash map.

seancorfield 2018-11-17T23:10:37.007600Z

(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)