Closed 0xtmphey closed 4 years ago
Hello folks!
Maybe I'm doing something wrong but when I try to make an async request, it ignores async? option, blocks and returns response map directly instead of calling callbacks.
async?
[clj-http "3.10.1"]
Making a request from readme:
(http/get "http://example.com" {:async? true} ;; respond callback (fn [response] (println "response is:" response)) ;; raise callback (fn [exception] (println "exception message is: " (.getMessage exception))))
Here is the response:
{:status 200, :headers {"X-Cache" "HIT", "Server" "ECS (dcb/7EEA)", "Age" "277711", "Content-Type" "text/html; charset=UTF-8", "Content-Length" "648", "Connection" "close", "Accept-Ranges" "bytes", "Expires" "Mon, 17 Aug 2020 03:55:28 GMT", "Etag" "\"3147526947\"", "Date" "Mon, 10 Aug 2020 03:55:28 GMT", "Vary" "Accept-Encoding", "Last-Modified" "Thu, 17 Oct 2019 07:18:26 GMT", "Cache-Control" "max-age=604800"}, :body "... some html content ...", :request-time 450, :trace-redirects ["http://example.com"], :orig-content-encoding "gzip"}
P.S. I'm making this request from CIDER repl
False alarm :) For some reason previous version was cached or something like this and it was not using the right .jar
Hello folks!
Maybe I'm doing something wrong but when I try to make an async request, it ignores
async?
option, blocks and returns response map directly instead of calling callbacks.Making a request from readme:
Here is the response:
P.S. I'm making this request from CIDER repl