Questions tagged [apache-httpasyncclient]

HttpAsyncClient component of the Apache HttpComponents project.

92 questions
0
votes
0 answers

How to POST NON-JSON request using Apache HttpAsyncClient?

I am trying to use apache httpAysncClient post request where I am hitting an API with textfile(having plain text data) and in response i will get a string data. How can I use apache httpAysncClient?
0
votes
0 answers

Apache Async HTTP send requests with new Proxy on each Request

I have to check thousands of proxy servers continuously. To speed it up, I am thinking to create a batch of size N(say 50) and send requests to them concurrently. Each proxy server has a unique IP/Port and username/password authentication. Since I…
0
votes
0 answers

CloseableAsyncHttpClient not Working for Post MultiPart Request, Response Callback Not Calling

I am trying to execute a MultiPart request with form parameters using Apache Async Http Client. Below is My HttpClientManager, public class AsyncHttpClientManager { private final PoolingNHttpClientConnectionManager connectionManager; …
0
votes
1 answer

Where is the missing HTTP request when the CountDownLatch is getting zero count?

I am testing a multithread code that sends a set of http requests using a CloseableHttpAsyncClient client (see a snip of the code bellow). I am obtaining the following output: Failed ->java.io.IOException: Connection reset by peer-null Failed…
Roxana
  • 392
  • 1
  • 3
  • 12
0
votes
0 answers

Exception logging in HttpAsyncClient callback

How can I log exceptions which happen in an Apache HttpAsyncClient callback method? For example the following code throws NullPointerException, but it's hidden. CloseableHttpAsyncClient client = HttpAsyncClients.createDefault(); try { final…
0
votes
1 answer

Getting error with httpclient5 with HTTP2 & SSL (java.io.IOException: An existing connection was forcibly closed by the remote host)

I am writing a client using HttpClient 5.0 beta to request/load a secure URL/resource in Tomcat which supports HTTP2. The program is as below. It is taken from Apache httpclient 5 examples (the code is exactly same except the way the SSL context is…
0
votes
2 answers

HTTP2 url loading succesfuly in browser but fails in httpclient5

I am trying to create a httpclient 5 example which loads the URL using asynchttpclient(Asynchronous multiplexing) with this example, I have configured the tomcat 9 to accept http2 protocol using the conf/server.xml configuration as…
0
votes
1 answer

How do I provide create a CloseableHttpPipeliningClient that doesn't validate SSL certificates?

I'm trying to use Apache HttpAsyncClient with HTTP pipelining support. I want to add a trust-all SSL strategy similar to what's discussed here Ignoring SSL certificate in Apache HttpClient 4.3 (and a bunch of other places). But I don't see any way…
0
votes
0 answers

How do I create an AsyncRestTemplate in Spring with caching?

I would like to create an AsyncRestTemplate which also has Http Caching enabled... From what I've read, it seems as though I need to explicitly enable Http Caching by creating a AsyncHttpClient (How do I create an async caching http…
0
votes
1 answer

Apache HttpComponents CookieStore Not Storing Cookies

I'm using HttpComponents 4.5.2 and I'm trying to store cookies as I need to use them for login and other requests. The code works fine whilst the application is still running, but the problem here is when I restart it, the cookies that were supposed…
0
votes
1 answer

org.apache.http.nio.reactor.IOReactorException: I/O dispatch worker terminated abnormally

I have a service which uses apache HttpAsyncClient. (versions: httpasyncclient-4.0.2.jar, httpcore-4.4.3.jar, httpcore-nio-4.3.3.jar) All requests start failing some time after starting the async client with following being initial exception…
knash
  • 369
  • 1
  • 4
  • 8
0
votes
1 answer

HttpAsyncClient isn't making request if setConnectionManagerShared is set to true

For some reason HttpAsyncClient isn't making request if setConnectionManagerShared is set to true. I found this bug but couldn't figure out what I'm missing. Here is how I create new client def apply(proxy: Option[HttpHost], cookieStore:…
0
votes
1 answer

Get the connection speed when using HttpAsyncClient

When use synchronous HttpClient, it's very easy to get the time of one request, just put System.currentTimeMillis() before and after the execute() method. But when it comes to HttpAsyncClient, the execute() is asynchronous , which will just put the…
soulmachine
  • 3,917
  • 4
  • 46
  • 56
0
votes
1 answer

HttpAsyncClient PoolingNHttpClientConnectionManager.requestConnection failed to return?

Following is the code to request NHttpClientConnection from PoolingNHttpClientConnectionManager. The call connFuture.get(), fails to return. Anyone knows why? I am using HttpAsyncClient library httpasyncclient-4.0.1.jar static NHttpClientConnection…
0
votes
1 answer

How does requestConnection for PoolingNHttpClientConnectionManager work in Apache HttpAsyncClient?

How does requestConnection for PoolingNHttpClientConnectionManager work in Apache HttpAsyncClient? Can someone show me a working example?
stones333
  • 8,588
  • 1
  • 25
  • 27