Skip to content

Instantly share code, notes, and snippets.

@KirinDave

KirinDave/ex.clj Secret

Created November 22, 2010 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KirinDave/f8579d7df3ebb2aaaed6 to your computer and use it in GitHub Desktop.
Save KirinDave/f8579d7df3ebb2aaaed6 to your computer and use it in GitHub Desktop.
(def behavior
{:allowed-methods (constantly #{:get :post})
:last-updated (fn [& args] @*last-tapped*)
:previously-existed? (constantly true)
:content-types-provided (constantly {"text/plain" (fn [_ _] (str "Last tapped at " @*last-tapped*))})
:process-post (fn [& args]
(reset! *last-tapped* (now)))
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment