Print the request

This commit is contained in:
niten 2023-03-16 14:44:35 -07:00
parent 4893b8243c
commit 8532b3a518
1 changed files with 5 additions and 2 deletions

View File

@ -2,7 +2,8 @@
(:require [clj-http.client :as client] (:require [clj-http.client :as client]
[clojure.data.json :as json] [clojure.data.json :as json]
[clojure.string :as str] [clojure.string :as str]
[slingshot.slingshot :refer [throw+]]) [slingshot.slingshot :refer [throw+]]
[clojure.pprint :refer [pprint]])
(:import java.net.URL (:import java.net.URL
java.io.ByteArrayInputStream)) java.io.ByteArrayInputStream))
@ -38,10 +39,12 @@
:reason (:reason-phrase resp) :reason (:reason-phrase resp)
:response resp}))) :response resp})))
(defn- pthru [o] (pprint o) o)
(defrecord ObjectifierClient [scheme host port] (defrecord ObjectifierClient [scheme host port]
IObjectifierClient IObjectifierClient
(get! [self image-data] (get! [self image-data]
(process-response (send-image! (build-url self) image-data))) (process-response (send-image! (build-url (pthru self)) image-data)))
(get-labels! [self image-data] (get-labels! [self image-data]
(-> (get! self image-data) (-> (get! self image-data)