Skip to content

Instantly share code, notes, and snippets.

@clows
Created February 7, 2012 21:32
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 clows/1762137 to your computer and use it in GitHub Desktop.
Save clows/1762137 to your computer and use it in GitHub Desktop.
(ns ring-test.core
(:use ring.adapter.jetty)
(:use ring.middleware.multipart-params))
(def data (atom []))
(defn app [req]
wrap-multipart-params
(swap! data conj req)
{:status 200
:headers { "Content-Type" "text/html"}
:body (str (slurp (:body req)))})
(defonce server (run-jetty #'app {:port 8081 :join? false}))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment