Questions tagged [asynchttpclient]

Asynchronous HTTP client library for Java

See the GitHub repo for more information. In essence:

AsyncHttpClient allows Java applications to easily execute HTTP requests and asynchronously process the HTTP responses. Feature-packed, wicked fast, and actively maintained.

323 questions
1
vote
1 answer

AsyncHttpClient sets content-type inconsistently

I use AsyncHttpClient to create an http POST request: AsyncHttpClient.BoundRequestBuilder reqBuilder; reqBuilder = httpClient.preparePost(url); reqBuilder.setBody(data); It sometimes doesn't send content-type header and sometimes…
Fakrudeen
  • 5,778
  • 7
  • 44
  • 70
1
vote
1 answer

WebSockets (wss) and Proxy Server with AsyncHttpClient

I am trying to use AsyncHttpClient with a proxy server configuration to connect using wss and am having no luck. I've been using async-http-client 1.7.5 and grizzly-websockets 2.2.13 My first attempt AsyncHttpClientConfig config = new…
0
votes
1 answer

How to create and set NioEventLoopGroup for asynchttpclient?

I am trying to set an event loop group while creating AsyncHttpClient but I would like to understand the input parameters for creating and setting an eventLoop. NioEventLoopGroup eventLoopGroup = new NioEventLoopGroup(32,…
user1429322
  • 1,266
  • 2
  • 24
  • 38
0
votes
1 answer

How to set an executor for async-http-client?

How to setup the thread pool size for async-http-client? I found this - https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Executors.html to create a thread pool. But I am not able to set the executor for the client. My connections are…
user1429322
  • 1,266
  • 2
  • 24
  • 38
0
votes
0 answers

Why is the same http post request failing with jsoup but working with AsyncHttpClient?

want to get the data from reddit profile pages. Some of these pages are tagged as nsfw, so users have to click accept in gui. (e.g. https://old.reddit.com/user/3DigitIQ) After clicking the page send a post request with "over18=yes" body and gets…
CampingCow
  • 120
  • 10
0
votes
1 answer

I wasn't able to autowire org.asynchttpclient.AsyncHttpClient in my Spring Web project

I have the following @RestController which makes POST request. I am able to Autowire and make REST calls with Resttemplate but when I try to use AsyncHttpClient, Spring complains about ClassNotFoundException even if I did autowire the class and…
WowBow
  • 7,137
  • 17
  • 65
  • 103
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

Request times out after being sent in AHC

I am using the org.asynchttpclient library version(2.12.3).I am using a service which makes a lot of downstream api calls to different services.Earlier I was using a single AHC object instance for all the downstream service calls with…
0
votes
1 answer

How to use AsyncHttpClient to send multiple HTTP calls asynchronously?

I'm using the https://github.com/AsyncHttpClient/async-http-client to send an asynchronous POST request. Example: try { CompletableFuture whenResponse = asyncHttpClient() …
ToDo
  • 754
  • 2
  • 17
  • 31
0
votes
1 answer

How to wrap org.json4s.JValue in org.asynchttpclient.Response

I'm refactoring some tests where previously the response was parsed into org.json4s.JValue I want to pass the response as type org.asynchttpclient.Response as input parameter. In order to distinguish the HTTP code status. NettyResponse and…
Raymond Chenon
  • 11,482
  • 15
  • 77
  • 110
0
votes
1 answer

Which Java client to use for calculating HTTP performance metrics like TCP connection time, Time to first byte, TLS handshake time etc

I am looking for a Java HTTP Async client which can be used to get performance metrics like TCP connection time, Time to first byte, TLS handshake time for an endpoint. I looked into latest java.net.http module but it does not seem to have any such…
Mary123
  • 11
  • 4
0
votes
1 answer

Get the response from AsyncHttpClient and process it in the calling thread

I am trying to execute http request asynchronously with async-http-client (built on top of Netty). Below is the code public void fetch() { AsyncHttpClient asyncHttpClient = asyncHttpClient(config().setThreadFactory(new…
0
votes
1 answer

Setting SSL Parameters on Apache http5 Client

I am upgrading from Apache httpcomponents 4 to version 5 in order to get http2/http1.1 support. I need to specify the ciphers my client offers. I assume that H2/1.1 ALPN is the default behavior for the AsyncHttpClient. Here is my current code for…
SteveB
  • 483
  • 1
  • 4
  • 18
0
votes
1 answer

How to intercept a request in Apache AsyncHttpClient?

Is there a way to intercept a request made by AsyncHttpClient and do some operations based on the request data. I want to do something like this: interceptor = new Interceptor(){ process(request){ //do something } …
Praveen Kumar
  • 222
  • 3
  • 6
0
votes
1 answer

android volley and asynchttpclient failed on real device but worked on emulator

hello every one I just make an android app that using ICS_OPENVPN library but when I make SplashActivity to check for update app worked Currect on emulator but when I generate for signed APK and install it on real device it is not switch to…