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
2
votes
1 answer

How to close AsyncHttpClient in scalaz Task

I am trying to combine AsyncHttpClient and Scalaz Task together. Normally, if I am using AsyncHttpClient, I can invoke client.close to stop the client. val asyncHttpClient = new…
Xiaohe Dong
  • 4,953
  • 6
  • 24
  • 53
2
votes
0 answers

Error creating WebSocket connection using AsyncHttpClient behind Squid Proxy

Library in use: AsyncHtpClient Library: Version : 1.9.32 Location: https://github.com/AsyncHttpClient/async-http-client Netty Version : 3.10.3.Final Proxy: Squid Proxy I am trying to create a websocket connection using AsyncHttpClinet library. It…
Sudhanshu
  • 421
  • 2
  • 6
  • 15
2
votes
3 answers

Can't override onSuccess() method in JsonHttpResponseHandler

I am learning restful services in http://www.raywenderlich.com/78578/android-tutorial-for-beginners-part-3 while coming across AsyncHttpClient client = new AsyncHttpClient(); client.get(QUERY_URL + urlString, new…
2
votes
1 answer

Building a scalable http client in Java that fires 10k http requests per minute

In our application we need to make around 10k REST api calls to 10k different endpoints URLs per minute. Earlier I was using synchronous model, but quickly realized that I can not scale beyond ~2k+ limit, so I am working on switching to an async…
mandar bapaye
  • 51
  • 1
  • 2
2
votes
0 answers

100-continue not processed by AsyncHttpClient . How to make it work?

Below is the request header and response (100-continue) response from server after which connection is reset. The server returns a 100-continue, but the client doesnt wait till its gets the 200OK and resets the connection. How do I make client wait…
naveen
  • 243
  • 1
  • 3
  • 11
2
votes
1 answer

How save cookie between request in asyncHttpClient?

I send two request and I want do second request with cookie (cookie from response from first request). How it work now: Future f = asyncHttpClient .prepareGet(URL_1) .execute(); Response r = f.get(); /* I want code without saving…
couatl
  • 416
  • 4
  • 14
2
votes
1 answer

Not getting response with Http Async Client

I am stuck with this weird situation where sometimes my HTTP requests don't go out or I don't get a HTTP response to my request sporadically. My application makes several (100s) http requests to other 3rd party service periodically most of which…
bsam
  • 1,838
  • 3
  • 20
  • 26
2
votes
0 answers

SyncHttpClient and AsyncHttpClient

I would like to know why I can successfully upload a file to a server using AsyncHttpClient but not when using SyncHttpClient. The following setting yields successful result: MultipartEntityBuilder to build my multipart upload request +…
Jonas
  • 534
  • 8
  • 16
2
votes
0 answers

Share cookies between Loopj AsyncHttpClient and WebClient

I've been unsuccessfully trying to do the following: Use loopj AsyncHttpClient to perform a request to a login page using a post request The login page logs the user in and responds with a session cookie later, on the same application, I create a…
Marco
  • 175
  • 2
  • 8
2
votes
1 answer

Cannot Resolve Symbol 'execute', android studio 8.0 beta

I know many people have issues like mine, but the answers I found didn't seem to work. import android.os.AsyncTask; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import…
dje
  • 53
  • 1
  • 6
2
votes
1 answer

tornado curl http client CANNOT fetch binary file

I want to fetch a Image(GIF format) from a website.So I use tornado in-build asynchronous http client to do it.My code is like the following: import tornado.httpclient import tornado.ioloop import tornado.gen import…
riaqn
  • 107
  • 1
  • 8
2
votes
4 answers

Get URL content with Basic Authentication with Java and async-http-client

I am writing a Java lib and need to perform a request to a URL - currently using async-http-client from ning - and fetch its content. So I have a get method that returns a String of the content of the fetched document. However, to be able to get it,…
rodrigoalvesvieira
  • 7,895
  • 15
  • 63
  • 84
2
votes
1 answer

JSON post with asynchttpclient

I'm trying to do a POST request on a REST service with async support (provided by atmosphere). Here's what my service looks like: package co.damt.services; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.GET; import…
user1316487
2
votes
2 answers

AsyncHttpClient and timeouts

In AsyncHttpClient JDKFuture.get() public V [More ...] get(long timeout, TimeUnit unit) { V content = null; try { if (innerFuture != null) { content = innerFuture.get(timeout, unit); } …
Fakrudeen
  • 5,778
  • 7
  • 44
  • 70
1
vote
0 answers

Why I am getting 'SslHandler removed before handshake completed message' while consuming a service using AsyncHttpClient in Java

I used DefaultAsyncHttpClientConfig to configure connection timeout and SSL context. DefaultAsyncHttpClientConfig.Builder clientBuilder = Dsl.config() .setConnectTimeout(100) .setKeepAlive(true) …