e1e283d701
Add query params back into the Java client, along with tests to validate this functionality is working.
20 lines
No EOL
538 B
Clojure
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"}) |