Created
February 2, 2010 20:25
-
-
Save ordnungswidrig/292997 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
(def hello-resource | |
(resource | |
:content-types-provided { "text/html" :to_html ; lookup | |
"text/markdown" :please_make_markdown ;double lookup | |
"text/plain" "Plaintext" ; literal | |
"x/y" (fn [rmap req status] (str "Status " status)) ; function | |
"foo/bar" [500 "Experimental Server Error"] } ; | |
:to_html (html [:body [:h1 "This is HTML!"]] | |
:please_make_markdown :please_please_markdown | |
:please_please_markdown "Yes, this is markdown")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment