Fork me on GitHub
#ring
<
2022-03-02
>
zendevil.eth19:03:29

hi, for some reason none of my post requests are working. Is there a middleware that I need to install?:

(defn home-routes []
  [ ""
   {:middleware [middleware/wrap-csrf
                 middleware/wrap-formats
                 coercion/coerce-request-middleware
                 ]}
   ["/" {:get home-page}]
   ["/about" {:get about-page}]
   ["/api/login" {:coercion spec/coercion
                  :post login-handler
                  ;;:parameters {:query ::login-params}
                  }]])
when I change the :post to get the request works but not when I have post

hiredman21:03:10

what do you mean not working?

hiredman21:03:01

whatever you are see there is not strictly speaking ring, but whatever routing library you are using (I can't tell from just that snippet, I've haven't seen middleware attached like that before)

hiredman21:03:21

I guess it is reitit? the middleware thing just threw me