HttpAsyncClient component of the Apache HttpComponents project.
Questions tagged [apache-httpasyncclient]
92 questions
0
votes
0 answers
log4j:WARN No appenders could be found for logger (org.apache.hc.client5.http.impl.classic.InternalHttpClient)
I've implemented a simple Java app that uses httpclient 5.1.3. I'm also using log4j2 (2.1.9) and have configured it emit log entries at the wire level. I know the log4j2 config is loaded because I can see my file appender working when I emit log…

Jack
- 29
- 5
0
votes
1 answer
Apache HttpAsynClient not sending multiple requests asynchronously
Following the Apache HttpAsyncClient example here, the HTTP GET requests are not all being fired at once but rather (mostly) synchronously.
The image below shows the requests coming in the same order it was sent (except for one). This remains true…

ToDo
- 754
- 2
- 17
- 31
0
votes
0 answers
How to read request body from HttpAsyncRequestProducer?
I am unable to get request body from this HttpAsyncRequestProducer of org.apache.http.nio.protocol.
I also want to read the request body multiple times.
My Usecase:
I am intercepting execute method of InternalHttpAsyncClient of…

Gourav Kumar
- 205
- 1
- 7
0
votes
1 answer
Spring Config Server - customize http client
I using Spring Config Server with git repo. I want add interceptor to standart http client, which connect to git. How can I do it?

All_Safe
- 1,339
- 2
- 23
- 43
0
votes
0 answers
Adding SSLContext in CloseableHttpAsyncClient at Runtime
We have a generic application which delivers message to different POST endpoints. And we are using
CloseableHttpAsyncClient for this purpose. Its been built/initialized as follows,
private static CloseableHttpAsyncClient get() {
…

sakura
- 2,249
- 2
- 26
- 39
0
votes
0 answers
Kotlin/Ktor: "closing chunk expected" when requesting a web page
I'm trying to request a simple HTTP resource in Kotlin using Ktor's client library (1.4.1):
//
// DomainSpecificObjectFactory.kt
//
object DomainSpecificObjectFactory {
private val client = HttpClient {
UserAgent("some user agent…

Dor
- 902
- 4
- 24
0
votes
0 answers
HttpAsyncClient HC5 request timeout
We are checking to use HttpAsyncClient from HttpClient 5.0 which will be created in Flink AsyncFunction.
The requirements are the following:
The client is created per request;
SSL certificate should be loaded in run time from files;
The request…

Yulia
- 13
- 3
0
votes
1 answer
What to replace with deprecated `DefaultHttpAsyncClient`?
I'm modifying a existing project but I see that DefaultAsyncHttpClient is deprecated. What to replace the deprecated one?
HttpAsyncClient httpclient;
InputStream is = null;
try {
// TODO: deprecated ??
…
user13089222
0
votes
1 answer
Apache HTTPAsyncClient closes connection before response
I am sending a GET request to an API using the Apache AsyncHTTPClient version 4.1.4 (latest). I can't seem to get a response from the server.
This is my request log.
Jun 04, 2020 3:40:01 PM org.apache.http.impl.nio.client.MainClientExec…

Saminda Peramuna
- 735
- 9
- 22
0
votes
0 answers
Java 8 RestService: Efficient way to set Response Timeout in Spring bean
I'm writing a custom RestService(wrapper of Apache Http Client 4.5.10) and RestServiceAsync(wrapper of Apache httpasyncclient 4.1.4) in Spring MVC monolithic application.
Below is my IRestService
public interface IRestService {
public T…

OTUser
- 3,788
- 19
- 69
- 127
0
votes
1 answer
Is it possible to abort the http request[GET, POST, etc] in HttpAsynClient from HttpClient-5.x?
I'm using org.apache.hc.client5.http.impl.async.HttpAsyncClients.create() to create org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient for my HTTP/2 requests. I'm looking for some functionality to abort the request after reading some…

Rajeshwaran R
- 35
- 1
- 5
0
votes
1 answer
Upload image file to laravel api from android
I am not able to understand how could I upload image file from my android device to Laravel API with POST data, I am already sending some text data to API using android-asynchronous-http-client but it's not working with Image files. The API end…

Abdullah
- 123
- 1
- 1
- 11
0
votes
1 answer
Content GZIP decompression for Apache Http Async Client
In the classic HttpClient GZIP decompression is handled out of the box by ContentCompressionExec. How is this done with an HttpAsyncClient? I can't find any AsyncExecChainHandler that implements this functionality.

Martijn
- 2,268
- 3
- 25
- 51
0
votes
2 answers
HttpAsyncClient can not send many requests per second to a specific ROUTE(host)
why Apache HttpAsyncClient just send 10 request per second. Am i config something wrong? it my way to start an asyncClient:
PoolingNHttpClientConnectionManager connManager = null;
try {
if (client != null && client.isRunning()) {
…
0
votes
0 answers
DeadLock is happened when calling CloseableHttpAsyncClient Close method
I meet a wired question.
When I call HttpAsyncClients.excute method, if the net is unstable (can't connect to the server), the failed method will be called.
Then it will call CloseableHttpAsyncClient.close method which is blocked.
That makes the…

roast_soul
- 3,554
- 7
- 36
- 73