reitit

https://cljdoc.org/d/metosin/reitit/ https://github.com/metosin/reitit/
Joe 2020-11-05T13:33:23.297600Z

Apologies this is a super basic question but I can't seem to find anything on Google. I can see that I can use keywords in path names to indicate a variable, like thing/:thing-id/sub-thing, but I'm not clear on how to then use the thing-id in my handler. Does it get passed in as part of the request?

2020-11-05T13:36:19.299Z

You should end up with a :path-params key added to the incoming request, with a value like {:thing-id "some-id"}

Joe 2020-11-05T13:42:53.299300Z

I see it - thanks very much!

ikitommi 2020-11-05T14:07:59.300100Z

if you set up automatic parameter coercion, the coerced parameters will be copiend under [:parameters :path].