SHARE
TWEET

Untitled

a guest Oct 6th, 2014 185 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (defresource user [u]
  2.   :available-media-types ["text/html"]
  3.   :handle-ok (fn [_] (format "User info: %s" u)))
  4.  
  5. (defroutes app
  6.   (ANY "/user/:u" [u]
  7.       :allowed-methods [:get :post]
  8.       :handle-ok (fn [_] (user u))
  9.       :post! (fn [_] (format "called post with %s" u))))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top