Last active
December 30, 2015 15:39
-
-
Save jplaza/7849574 to your computer and use it in GitHub Desktop.
Pedestal interceptors per HTTP verb
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
(defroutes routes | |
["/contact" {:get [:contact home/contact-page] ;; Handler for GET /contact | |
:post [^:interceptors [home/verify-contact-form] ;; Interceptors for POST /contact | |
:contact-submit home/contact-submit-form]} ;; Handler for POST /contact | |
^:interceptors [middlewares/keyword-params]]) ;; Interceptors for any HTTP verb in the /contact route |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment