              "Basic dXNlcjpwYXNzd29yZA==")))))
 
 (deftest request-post
-  (with-ring-server echo-rhandler
+  (with-ring-server echo-handler
     (let [response (http/post base-url {:body "foobar"})
           request-map (read-request response)]
       (is (= (:request-method request-map) :post))
       (is (= "foobar" (:body response))))))
 
 (deftest request-put
-  (with-ring-server echo-rhandler
+  (with-ring-server echo-handler
     (let [response (http/put base-url {:body "foobar"})
           request-map (read-request response)]
       (is (= (:request-method request-map) :put))
       (is (= "foobar" (:body response))))))
 
 (deftest request-translate
-  (with-ring-server echo-rhandler
+  (with-ring-server echo-handler
     (let [url (str base-url "/foo/bar/baz?surname=jones&age=123")
           response (http/post url {:body "hello"})]
       (is (= (:status response) 200))

       ~@body
       (finally (.stop server#)))))

;; (defn hello-world-rhandler
;;   [request]
;;   (println 111 request)
;;   {:status 200
;;    :headers {"content-type" "text/html"}
;;    :body "hello world"})

(defn echo-rhandler
  [request]
  {:status 200
   :headers {"request-map" (pr-str (dissoc request :body))}
   :body (:body request)})

(defn read-request
  [response]

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(deftest request-get
  (with-ring-server echo-handler
    (let [response (http/get base-url {:basic-auth ["user" "password"]})
          request-map (read-request response)]
      (is (= (:request-method request-map) :get))
