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

Error uploading bitmap using AsyncHttpclient

I am trying to send a bitmap (image captured in camera - Android) to nodejs. I am using AsycnHttpClient for the same. I am able to successfully send query parameters. I did refer to some of the links where the files are being sent and received. I…
0
votes
1 answer

vert-x 3.3.2 http client exception handler

Am using Vert-x 3.3.2. HttpClient.exceptionHandler and HttpClientRequest.exceptionHandler is throwing compilation error. Whether exception handler is removed for this classes. Any other way to handle this. var client =…
madz
  • 168
  • 2
  • 11
0
votes
1 answer

Cannot use AsyncHttpClient to fetch response from server

I am new to AsyncHttpClient and I am not able to implement AsyncHttpResponseHandler. Whenever I implement it, I have to override 2 methods onSuccess and onFailure. Both these methods are taking as parameter the following:- client.get(cityURL, new…
0
votes
0 answers

How to pass long as string on url for json response in loopj

Just started learning loopj. how to pass long {id} on url as string? I have a method in client like this, public static void getAllByIdForSpinner(Context context, String url, Header[] headers, RequestParams params,…
user3785322
  • 153
  • 1
  • 6
  • 15
0
votes
1 answer

Callback method for AsyncHttpClient if internet connection with no data android Loopj

I am using Loopj to get a request and response. But it seems that callback method is not called properly if internet connection with no data. When I click a listview its execute below code: AsyncHttpClient client = new AsyncHttpClient(); …
0xAliHn
  • 18,390
  • 23
  • 91
  • 111
0
votes
2 answers

java.net.UnknownHostException using AsyncHttpClient

I am trying to POST a request to server side from android client side, using AsyncHttpClient : For now i just want to check whether the response is coming back or not , so i have not implemented anything to parse request parameters at server side…
devcodes
  • 1,038
  • 19
  • 38
0
votes
1 answer

Http.configure(_ setFollowRedirects true)(svc OK as.String) giving OutOfMemory error saying too many open files

I have tried val r = Http.configure(_ setFollowRedirects true)(svc OK as.String) It worked though, but it started giving OutOfMemory error saying too many open files on system etc. Is there any way to set max redirect-limit and close the…
0
votes
1 answer

convert `com.ning.http.client.ListenableFuture[Any]` into `scala.concurrent.Future[Any]`

Is there any way I can convert a variable of type com.ning.http.client.ListenableFuture[A] into a type scala.concurrent.Future[A] in other words what would be the content of the function def toFuture[A](a:…
John
  • 4,786
  • 8
  • 35
  • 44
0
votes
0 answers

Connect Time out not working as expected

I am trying to connect to a remote server and have set the connect timeout to 120 seconds. Sometimes it connects, while sometimes it throws us Connect timeout even before trying for 2 mins. setConnectTimeout(120000); setReadTimeout(120000); I am…
kps
  • 163
  • 3
  • 12
0
votes
4 answers

Errors with async-http-client on android

When adding the library async-http-client as a dependency on gradle, at the time of compile it gives an error. build.gradle : Error log : Any solution?
LCK
  • 125
  • 1
  • 1
  • 9
0
votes
0 answers

How implement real-time bidirectional HTTP communication on top of Netty 4 using AHC

I'm writing a client using AsyncHttpClient (AHC) v2.0beta (using Netty 4 as a provider) that streams audio in real-time and it needs to receive server data in real-time too (while streaming). Imagine a HTTP client streaming the microphone's output…
FabienB
  • 1,104
  • 2
  • 11
  • 22
0
votes
2 answers

ERROR: java.lang.OutOfMemoryError: unable to create new native thread in Loop

Im getting a not so rare error, which happens to many, the thing is that im not using threads in my app. Its just a loop, one task after the other, so i dont understand why im getting out of threads. Basically for each line of the text file i make a…
Fabrizio Guespe
  • 583
  • 1
  • 10
  • 25
0
votes
2 answers

How to create a secure AsyncHttpClient POST request in java

I have a Swing application that requires to send login details to a server (written in Node.js) for verification. So far i've managed to successfully send http POST requests and get JSON objects from the server, only problem is, when sniffing with…
Lior Naar
  • 85
  • 1
  • 9
0
votes
1 answer

How to increase default buffersize in AsyncHttpClient?

How to increase default buffer size in AsyncHttpClient. I am using following code to read messages from a streaming server(Http long pooling). When server sends a message longer than 8KB, then my message is divided in to chunks. Ex:- Original…
user1097437
  • 111
  • 3
  • 12
0
votes
1 answer

Dispatch fails with Proxy that requires authentication: Remotely Closed Connection

What is happening when I use dispatch to make a GET request? I can use a proxy, but I cannot use a proxy that requires authentication. This works: val ps = new ProxyServer(host, port) val svc = request.setProxyServer(ps) val resp = Http(svc >…
user2827214
  • 1,191
  • 1
  • 13
  • 32