 
 (defcoretest receiving-a-chunked-body
   [ch1 ch2]
-  (deftrackedapp [upstream request]
-    (upstream :response [200 {"transfer-encoding" "chunked"} :chunked])
-    (upstream :body "Hello")
-    (upstream :body "World")
-    (upstream :done nil)
-    (fn [_ _]))
+  (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]


(defcoretest telling-the-application-to-chill-out
  [_ ch2 ch3]
  (fn [resp req]
    (resp :response [200 {"content-length" "5"} "Hello"])
    (resp :pause nil)
    (receive-all ch3 (fn [_] (resp :resume nil)))
    (fn [evt val] true))

  (let [latch (atom true)]
    (client/request


(defcoretest handling-100-continue-requests-and-responses
  [ch1 ch2]
  (deftrackedapp [downstream]
    (fn [evt val]
      (when (= :request evt)
        (downstream :response [100]))
      (when (= :done evt)
        (downstream
         :response
         [200 {"content-length" "5" "connection" "close"} "Hello"]))))

