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
3
votes
2 answers

How to setup proxy in AsyncHttpClient?

My app uses AsyncHttpClient library for network operation.My problem is i need to specify the proxy with port in order to connect to remote server.Any ideas to specify it??
Tom
  • 33
  • 1
  • 3
3
votes
1 answer

Blocking message pending 10000 for BLOCKING..using spring websockets

I am facing the following error while using spring websockets: Use case: On our server side code we have a fucntionality to search values in data base..if the values are not present in database..it will hit a servlet and get the data..The second…
svs teja
  • 957
  • 2
  • 22
  • 43
3
votes
4 answers

onSuccess(int, Header[], JSONObject) was not overriden, but callback was received

I am using android-async-http, and override all the onSuccess and onFailure method, but I got the error: onSuccess(int, Header[], JSONObject) was not overriden, but callback was received. …
Shuai Wang
  • 335
  • 1
  • 8
  • 20
3
votes
1 answer

Can't POST using loopj AsyncHttpClient and an authorization header

I am using loopj (1.4.7) and AsyncHttpClient to post Json to a Web API server. My (simplified) code is: private void createCode() { // 1. Get the current data and time DateFormat df = DateFormat.getDateTimeInstance(); …
Colca
  • 41
  • 1
  • 5
3
votes
0 answers

Incomplete JSON response using asyncHttpClient.get()

I'm using asyncHttpClient.get() in a scenario where the response should return a huge amount of data, but the response is incomplete (and unparseable). Reference link : asyncHttpResponseHandler.onSuccess Here is my…
Balu
  • 1,069
  • 2
  • 10
  • 24
3
votes
2 answers

async-http-client requests timing out with NettyAsyncHttpProvider

I'm using async-http-client but I'm having trouble with NettyAsyncHttpProvider. It gives this warning: Oct 28, 2014 12:50:16 PM org.jboss.netty.channel.socket.nio.AbstractNioWorkerPool WARNING: Failed to get all worker threads ready within 10…
Tinou
  • 5,908
  • 4
  • 21
  • 24
3
votes
1 answer

Get ahcResponse from Play WS

I had this: class RichResponse(future: Future[WSResponse]) { def failIfNot(statuses: Int*)(implicit executor: ExecutionContext) = { future.map { response => if(statuses.contains(response.status)) { response } else { …
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
3
votes
0 answers

HttpAsyncClient SSL with client authentication

I want to use a HttpAsyncClient using SSL and with Client authentication (in addition to Server auth). I had some problems, but finally I found the right way. I show you how to do it: Generate keystore from PEM (PEM -> PKCS#12 keystore -> JKS…
Carlos AG
  • 1,078
  • 1
  • 12
  • 16
3
votes
1 answer

Use Apache Camel for doing a fire and forget HTTP request

I would like to know if it is possible to do a HTTP POST Request fire and forget and don't wait until you get a response. I am not sure if I should using HTTP component or AHC, I guess AHC is more convenient for my scenario. I am using Apache Camel…
hveiga
  • 6,725
  • 7
  • 54
  • 78
3
votes
1 answer

Why does async-http-client does not throttle my requests?

I have an Akka actor that owns an AsyncHttpClient. This actor must handles a lot of asynchronous requests. Because my system cannot handle thousands of requests simultaneously, I need to limit the number of concurrent requests. Right now, I'm doing…
DrMonkey68
  • 127
  • 11
3
votes
1 answer

Using Async HTTP Client netty client bombs out with high load?

I'm having trouble with some code I'm testing using AsyncHTTPClient. Here is the general config this.config = (new AsyncHttpClientConfig.Builder()) .setAllowPoolingConnection(true) .setAllowSslConnectionPool(true) …
user611105
3
votes
2 answers

AsyncHttpClient (Java) onComplete(): Does onCompleted() run on the separate thread?

Looking at the code block in the Java library AsyncHttpClient, the client starts a new thread (a Future) to make the request. Will the callback happen on the same thread, or will it run on the "main" thread (in this case, the thread where new…
Roy
  • 3,574
  • 2
  • 29
  • 39
2
votes
1 answer

How to set a path parameter using the AsyncHttpClient library

I am using AsyncHttpClient for making HTTP calls. I am unable to find a solution to set a path parameter in a URL. Here is an example: userId = "dmsask121" String v3_USER_DETAILS = "http://example.com/users/{userId}/details"; Request request = new…
Bharat Bhagat
  • 381
  • 1
  • 5
  • 14
2
votes
1 answer

How to consume external websocket API in Apache Camel since ahc-ws deprecate?

ahc and ahc-ws (Async Http Client) components have been deprecated in Apache camel version 3.16: https://issues.apache.org/jira/browse/CAMEL-17667. Is there an alternative for ahc-ws? The component was very easy to use to consume external websockets…
2
votes
0 answers

Why blocking on thenApplyAsync works but not with thenApply

We saw some interesting behavior in our application. The following Spock spec captures the behavior. I am trying to understand why the second test passes but the first one throws a TimeoutException. Summary: There is a mock server with a mock…
SwitchCase
  • 58
  • 6