Advertisement
Guest User

Untitled

a guest
Jan 27th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ;;'client'
  2. (comment
  3.  
  4.   (client/post "http://localhost:3000"
  5.                {:form-params
  6.                 {:some-edn
  7.                  (pr-str
  8.                   '(defn hello
  9.                      []
  10.                      "hi there"))}})
  11.  
  12.   (:body (client/get "http://localhost:3000")))
  13.  
  14.  
  15. ;;server
  16. (defn hello
  17.   []
  18.   "hey")
  19.  
  20. (defroutes app-routes
  21.   (GET "/" [] (#'hello))
  22.   (POST "/" [some-edn] (eval (read-string some-edn)))
  23.   (route/not-found "Not Found"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement