Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 276dd35

Browse files
bharendtlispyclouds
authored andcommitted
Destructure passed headers correctly
which are passed as `header` key without the tailing `s` to the `fetch` function and are referenced without it in the API yaml file.
1 parent 57eaa8f commit 276dd35

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/clj_docker_client/requests.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@
9090

9191
(defn build-request
9292
"Builds a Request object for OkHttp."
93-
[{:keys [method ^String url query headers path body]}]
93+
[{:keys [method ^String url query header path body]}]
9494
(let [formatted-url (interpolate-path url path)
9595
url-builder (add-params (.newBuilder (HttpUrl/parse formatted-url))
9696
query
9797
:query)
9898
req-builder (-> (Request$Builder.)
9999
(.url (.build ^HttpUrl$Builder url-builder))
100-
(add-params headers :header))
100+
(add-params header :header))
101101
req-body (cond
102102
(nil? body)
103103
(RequestBody/create nil "")

0 commit comments

Comments
 (0)