Skip to content

Instantly share code, notes, and snippets.

@sw-samuraj
Last active July 10, 2017 13:34
Show Gist options
  • Save sw-samuraj/88f981daab3191c4a29112891ae2fba3 to your computer and use it in GitHub Desktop.
Save sw-samuraj/88f981daab3191c4a29112891ae2fba3 to your computer and use it in GitHub Desktop.
An example of the common Ring middleware (for a blog post).
(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