 
 (defcoretest issuing-pause-resume
   [_ ch2 ch3]
-  (fn [resp req]
-    (resp :response [200 {"transfer-encoding" "chunked"} :chunked])
-    (resp :body "Hello")
-    (resp :body "World")
-    (resp :done nil)
-    (fn [_ _] true))
+  (fn [downstream]
+    (fn [evt val]
+      (when (= :request evt)
+        (downstream :response [200 {"transfer-encoding" "chunked"} :chunked])
+        (downstream :body "Hello")
+        (downstream :body "World")
+        (downstream :done nil))))
 
   (let [upstream
         (client/request


(defcoretest simple-keep-alive-requests
  [_ ch2]
  (deftrackedapp [upstream request]
    (upstream :response [200 {"content-length" "5"} "Hello"])
    (fn [_ _]))

  (client/request
   ["localhost" 4040]


(defcoretest receiving-a-chunked-body
  [ch1 ch2]
  (deftrackedapp [downstream]
    (fn [evt val]
      (when (= :request evt)
        (downstream :response [200 {"transfer-encoding" "chunked"} :chunked])
        (downstream :body "Hello")
        (downstream :body "World")
        (downstream :done nil))))

  (client/request
   ["localhost" 4040]
