Open borkdude opened 6 years ago
I'm getting the same for these simple examples, unfortunately
(client/request {:url "https://www.example.com" :method :get :async? true}
(fn [response]
(println {:OK response}))
(fn [ex]
(println {:NOK ex})))
(client/get "https://www.example.com"
{:async? true}
(fn [response]
(println {:OK response}))
(fn [ex]
(println {:NOK ex})))
The stacktrace being:
#error {
:cause Connection closed
:via
[{:type org.apache.http.ConnectionClosedException
:message Connection closed
:at [org.apache.http.nio.protocol.HttpAsyncRequestExecutor endOfInput HttpAsyncRequestExecutor.java 350]}]
:trace
[[org.apache.http.nio.protocol.HttpAsyncRequestExecutor endOfInput HttpAsyncRequestExecutor.java 350]
[org.apache.http.impl.nio.DefaultNHttpClientConnection consumeInput DefaultNHttpClientConnection.java 261]
[org.apache.http.impl.nio.client.InternalIODispatch onInputReady InternalIODispatch.java 81]
[org.apache.http.impl.nio.client.InternalIODispatch onInputReady InternalIODispatch.java 39]
[org.apache.http.impl.nio.reactor.AbstractIODispatch inputReady AbstractIODispatch.java 121]
[org.apache.http.impl.nio.reactor.BaseIOReactor readable BaseIOReactor.java 162]
[org.apache.http.impl.nio.reactor.AbstractIOReactor processEvent AbstractIOReactor.java 337]
[org.apache.http.impl.nio.reactor.AbstractIOReactor processEvents AbstractIOReactor.java 315]
[org.apache.http.impl.nio.reactor.AbstractIOReactor execute AbstractIOReactor.java 276]
[org.apache.http.impl.nio.reactor.BaseIOReactor execute BaseIOReactor.java 104]
[org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker run AbstractMultiworkerIOReactor.java 588]
[java.lang.Thread run Thread.java 1583]]}}
I'm trying to run async requests with clj-http:
I keep seeing errors like:
and
Any pointers?