Skip to content

Commit

Permalink
rm dynamic for default client
Browse files Browse the repository at this point in the history
  • Loading branch information
onionpancakes committed Jun 26, 2024
1 parent 0078b6d commit 2374ccc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dev/onionpancakes/hop/client.clj
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@

;; Send

(def ^:dynamic *client*
"Delayed java.net.http.HttpClient used for send and send-async."
(def default-client
"Default delayed java.net.http.HttpClient used for send and send-async."
(delay (client {:connect-timeout (java.time.Duration/ofMinutes 5)
:follow-redirects :normal})))

Expand All @@ -99,9 +99,9 @@
(defn send
"Send request with default client."
([request]
(send-with @*client* request))
(send-with @default-client request))
([request body-handler]
(send-with @*client* request body-handler)))
(send-with @default-client request body-handler)))

(defn send-async-with
"Send async request with given client, returning a CompletableFuture."
Expand All @@ -117,9 +117,9 @@
"Send async request with default client, returning a CompletableFuture."
{:tag CompletableFuture}
([request]
(send-async-with @*client* request))
(send-async-with @default-client request))
([request body-handler]
(send-async-with @*client* request body-handler)))
(send-async-with @default-client request body-handler)))

;; RequestURI

Expand Down

0 comments on commit 2374ccc

Please sign in to comment.