Middleware that converts the string-keyed :params map to one with keyword
keys before forwarding the request to the given handler.
Does not alter the maps under :*-params keys; these are left with strings.
(defn wrap-keyword-params
"Middleware that converts the string-keyed :params map to one with keyword
keys before forwarding the request to the given handler.
Does not alter the maps under :*-params keys; these are left with strings."
[handler]
(fn [req]
(handler (update-in req [:params] keyify-params))))
Comments top
No comments for wrap-keyword-params. Log in to add a comment.