clj-http-client/test/puppetlabs/http/client/test_common.clj
Preben Ingvaldsen e1e283d701 (TK-29) Add query params to Java client
Add query params back into the Java client, along with tests
to validate this functionality is working.
2014-08-06 10:49:48 -07:00

20 lines
No EOL
538 B
Clojure

(ns puppetlabs.http.client.test-common
(:require [ring.middleware.params :as ring-params]
[puppetlabs.trapperkeeper.core :as tk]))
(defn query-params-test
[req]
{:status 200
:body (str (:params req))})
(def app-wrapped
(ring-params/wrap-params query-params-test))
(tk/defservice test-params-web-service
[[:WebserverService add-ring-handler]]
(init [this context]
(add-ring-handler app-wrapped "/params")
context))
(def queryparams {"yellow" "submarine"
"eleanor" "rigby"})