commit 05d91d6713890ca14df30ad7a5a4683e56b091a0 from: Omar Polo date: Fri Oct 15 21:52:20 2021 UTC with-request: take the map instead of a fetch call commit - d4243d62bc166b69a609a3dcaf7cd15110ffd00f commit + 05d91d6713890ca14df30ad7a5a4683e56b091a0 blob - 679af87d3db70a4846445ff85259e207ff1f304a blob + bd0a1599d8ad6755a15f41e734c69b74af90c04a --- src/gemini/core.clj +++ src/gemini/core.clj @@ -144,8 +144,8 @@ (defmacro with-request "Make a request, eval `body` when it succeed and automatically close the request, or throw an exception if the request fails." - [[var req] & body] - `(let [~var ~req] + [[var spec] & body] + `(let [~var (fetch ~spec)] (when-let [e# (:error ~var)] (throw e#)) (with-open [req# (:request ~var)]