fix following response "Location" headers to not just follow them with HTTP 201 responses
This commit is contained in:
parent
bbea913abe
commit
6ead967447
|
@ -18,8 +18,8 @@
|
|||
:post (http-post-json url body)
|
||||
:put (http-put-json url body)
|
||||
:delete (http-delete-json url body))]
|
||||
(-> (if (= 201 (:status response))
|
||||
(http-get-json (get-in response [:headers "Location"]))
|
||||
(-> (if-let [location (get-in response [:headers "Location"])]
|
||||
(http-get-json location)
|
||||
response)
|
||||
:body
|
||||
(json/parse-string true)))
|
||||
|
|
Reference in a new issue