20 lines
538 B
Clojure
20 lines
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"})
|