From f4cae70094ccf5e03c138d771387193acc4e3ee4 Mon Sep 17 00:00:00 2001 From: Jim Crossley Date: Mon, 10 Aug 2015 17:29:30 -0400 Subject: [PATCH] Print body for non-200 responses --- web/dev-resources/testing/web.clj | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/dev-resources/testing/web.clj b/web/dev-resources/testing/web.clj index 3f36081b..479825a6 100644 --- a/web/dev-resources/testing/web.clj +++ b/web/dev-resources/testing/web.clj @@ -50,8 +50,10 @@ (with-open [client (http/create-client)] (let [response (get-response url :headers headers :cookies cookies)] (if (= 200 (:status response)) - (:body response) - (:status response))))) + (:body response) + (do + (if-let [b (:body response)] (println b)) + (:status response)))))) (defn event-source "Returns an SSE EventSource client"