             [clojure.test :refer :all]
             [clojure.java.io :as io]
             [clojure.pprint :refer [pprint]]
-            [clojure.core.async :as async]
             [clj-http.client :as client]
             [promesa.core :as p]
             [catacumba.stream :as stream]

  (testing "Using completable future as body."
    (letfn [(handler [ctx]
              (http/ok (p/promise (fn [resolve reject]
                                    (async/<!! (async/timeout 1000))
                                    (resolve "hello world")))))]
      (with-server {:handler handler}
        (let [response (client/get base-url)]

  (testing "Using manifold deferred as body."
    (letfn [(handler [ctx]
              (let [d (md/deferred)]
                (a/thread
                  (md/success! d "hello world"))
                (http/accepted d)))]
      (with-server {:handler handler}
