Last active
July 10, 2017 13:34
-
-
Save sw-samuraj/88f981daab3191c4a29112891ae2fba3 to your computer and use it in GitHub Desktop.
An example of the common Ring middleware (for a blog post).
This file contains hidden or 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 wrap-blank-middleware | |
"Blank middleware demonstrating common structure." | |
[handler] | |
(fn [request] | |
; Do some magic with the request | |
(let [response (handler request)] | |
; Do some magic with the response | |
; and return the response. | |
response))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment