Last active
October 20, 2022 10:34
-
-
Save oitee/00a6153e7ec90425a029516b73480523 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[ring.middleware.params :as rmp] | |
'[ring.middleware.keyword-params :as rmkp]) | |
(defn handler-that-needs-keyword-params | |
[{params :params}] | |
(ring.util.response/response "Hello" (:name params) " your ID is: " (:id params))) | |
(rmp/wrap-params | |
(rmkp/wrap-keyword-params handler-that-needs-keyword-params)) | |
;; => new handler function with the combined functionality of | |
;; wrap-params and wrap-keyword-params |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment