This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-01-07
Channels
- # announcements (2)
- # beginners (30)
- # calva (7)
- # cherry (15)
- # clerk (21)
- # clojure (1)
- # clojure-losangeles (12)
- # clojure-norway (1)
- # clojure-spec (3)
- # clojurescript (31)
- # conjure (2)
- # cursive (44)
- # datomic (13)
- # emacs (13)
- # honeysql (15)
- # hyperfiddle (7)
- # malli (2)
- # off-topic (17)
- # overtone (6)
- # reitit (7)
- # ring (58)
- # shadow-cljs (12)
- # squint (14)
- # tools-deps (14)
- # web-security (1)
- # xtdb (29)
how typically does one handle posted form data with reitit? I tried adding ring.middleware.multipart-params to my middleware, and setup my coercion with spec like this:
:post {:handler hl/post-handler
:parameters {:path {:question_id ::id}
:params {:choice ::id}}}
I can access question_id in (-> request :parameters :path :question_id)
. However can't seem to access :choice
.I do it with :form
in :parameters
:
{:parameters {:form {:choice ::id}}}
then access in
(-> request :parameters :form :choice)
thankyou
also what order are the middlewares evaluated? I made a middleware to just pretty-print the request map to a file, but whether I put it at the beginning or end it still seems the other middlewares have already run
do they run top-to-bottom?
yes they do I tested with a middleware that outputs a timestamp