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

I get the error in doInBackground () in AsyncTask

I get the error in the AsyncHttpClient section located in the doInBackground () section in asyncTask. How can I get rid of the error? The error received line is indicated below. Error: An error occured while executing doInBackground () public…
0
votes
1 answer

Java - AsyncHttpClient - Fire and Forget

I have a use-case where I need to make thousands of HTTP Get requests in Fire and Forget mode. I am using aync-http-client < https://github.com/AsyncHttpClient/async-http-client > to achieve this. async-http-client: 2.5.4 Java 11 I am using below…
0
votes
2 answers

Java asyncHttpClient new thread for each connection

Im doing library in java, library is for calling external service API. For this I am using AsyncHttpClient Some part of code: public CompletableFuture> clientCredentialsGrant(String clientId, String clientSecret, String…
FrancMo
  • 2,459
  • 2
  • 19
  • 39
0
votes
1 answer

Add file in request using AsyncHttp

I'm trying to do a post to an endpoint and set some form params and a file using AsyncHttp. This is the code I have: httpClient.preparePost(url) .addHeader(HttpHeaders.AUTHORIZATION, authorizationToken) .addHeader(HttpHeaders.ACCEPT,…
Manuelarte
  • 1,658
  • 2
  • 28
  • 47
0
votes
0 answers

What Best Practice to Submit a Failed Request Again

My AsyncHttpClient class is as follows. ApiHttpClient.java package virtualsystems.com.br.financial.client; import android.content.Context; import android.util.Log; import com.loopj.android.http.AsyncHttpClient; import…
0
votes
0 answers

Getting random ID

I have the method showTrajects where I loop all the id of trajects I have, until here good. Edit: I've looking and the problem is always getting the last ID of AllPendingTrajects, but why it's not getting in the first or second? The problem is…
Luis
  • 39
  • 1
  • 4
0
votes
1 answer

Java library for async 'multipart-form' file upload?

I am trying to upload a file (and additional fields) using single REST POST request. This request has to be processed asynchronous and form has to be submitted using multipart-form content type (because beside file I am sending few other text fields…
nteo
  • 11
  • 2
0
votes
0 answers

Android - cz.msebera.android.httpclient.entity.ByteArrayEntity required: org.apache.http.HttpEntity

I am using loopj AsyncHttpClient to call web services. I am trying register a user. So I need to send JSON data to Web Service. ByteArrayEntity entity = new ByteArrayEntity(json.toString().getBytes("UTF-8")); entity.setContentEncoding(new…
user9569492
0
votes
1 answer

Nettys NioWorker Channel close

I am trying to figure out why the below close function is being called in netty's(3.10.5) NioWorker. The full Class can be found here if (ret < 0 || failure) { k.cancel(); // Some JDK implementations run into an infinite loop…
Doctor White
  • 95
  • 14
0
votes
0 answers

Error calling Web Api (Asp net core 1.1). The operation timed out

I have a problem when I call the Web Api, i get the following error: An error occurred while sending the request..The operation timed out Any idea? I do not know where to follow. Thanks in advance. using (var httpClientHandler = new…
jesus
  • 39
  • 6
0
votes
2 answers

Closing Kubernetes Client with Fabric8

I am using the Fabric8 Java library to access the Kubernetes API within an actor system. I am concerned about connection leaks and want to understand how the client connections are closed underneath after a REST call is made Here is the code that…
user_mda
  • 18,148
  • 27
  • 82
  • 145
0
votes
0 answers

AsyncHttpClient is not sending requests

I have an app that sends POST requests to a server, it's implemented as follows: AsyncHttpClient myClient = new AsyncHttpClient(); RequestParams params = new RequestParams(); params.put("key", "value"); params.put("more",…
0
votes
1 answer

replace Location header when using .setFollowRedirect(true) with aysnchttpclient

I would like to replace Location header in one condition. I use the following to enable Redirect client.prepareGet(request.getUrl()) .setFollowRedirect(true) What I did is to extended AsyncCompletionHandler class, and from there I…
Holm
  • 2,987
  • 3
  • 27
  • 48
0
votes
0 answers

AsyncHttpClient post - program does not step into post method

I have just started working in Android Studio for a few days, I use Android Studio 3.0.1 and I want to write simple login app that makes a post request to a server. My colleage has prepared for me an api that I should connect. The problem is that…
Anatoly
  • 3,266
  • 4
  • 17
  • 28
0
votes
1 answer

Getting SocketTimeoutExceptions using loopj AsyncHttpClient.

12-19 13:28:49.902 22731-23091/com.aadi.edusuit W/System.err: java.net.SocketTimeoutException 12-19 13:28:49.903 22731-23091/com.aadi.edusuit W/System.err: at java.net.PlainSocketImpl.read(PlainSocketImpl.java:484) 12-19 13:28:49.903…
Ashwini
  • 653
  • 6
  • 7