Skip to content

Instantly share code, notes, and snippets.

(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
@clows
clows / gist:1761662
Created February 7, 2012 20:09
ring-request
{:remote-addr "192.168.1.19", :scheme :http, :query-params {}, :session {}, :form-params {}, :multipart-params {}, :request-method :post, :query-string nil, :content-type "application/x-www-form-urlencoded", :cookies {}, :uri "/notifications", :server-name "macbook", :params {}, :headers {"content-length" "114", "content-type" "application/x-www-form-urlencoded", "connection" "keep-alive", "accept" "text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2", "host" "macbook:8080", "user-agent" "Java/1.6.0_22"}, :content-length 114, :server-port 8080, :character-encoding nil, :body #<Input org.mortbay.jetty.HttpParser$Input@3eaa2c1c>}