Last active
October 12, 2022 06:22
-
-
Save oitee/5d48406fd00613fbe55f9bfeccf1505b 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
(defn middleware-fn | |
[handler-fn] | |
(fn [request] | |
;; operations on the request: | |
;; to create a `new-request` | |
;; or to simply log etc | |
(let [new-response (handler-fn new-request)] | |
;; operations on the `new-response`: | |
;; to create a `new-and-modified-response` | |
;; or to simply log etc | |
new-and-modified-response))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment