;; This example adds support for parameters to a Ring handler:
(use 'ring.middleware.params
'ring.adapter.jetty)
(defn handler [{params :params}]
{:status 200
:headers {"Content-Type" "text/plain"}
:body (str "Hello " (params "name"))})
(def app
(wrap-params handler))
user=> (run-jetty app {:port 8080})
;; If you run this, then visit you will see a message saying "Hello Bob"
;; This example adds support for parameters to a Ring handler:
(use 'ring.middleware.params
'ring.adapter.jetty)
(defn handler [{params :params}]
{:status 200
:headers {"Content-Type" "text/plain"}
:body (str "Hello " (params "name"))})
(def app
(wrap-params handler))
user=> (run-jetty app {:port 8080})
;; If you run this, then visit you will see a message saying "Hello Bob"