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

Can we have AsyncHttpClient use existing threads to execute code?

I was trying to use AsyncHttpClient library to make NIO calls from my Java Spring MVC application. Since I already have incorporated Apache Camel (with camel-netty) within my application, I wanted to make use of the Camel-Netty's threads spawned…
Sameer Mirji
  • 2,135
  • 16
  • 28
1
vote
2 answers

AsyncHttpClient is not calling my POST API

I'm new to Android, I'm using AsyncHttpClient to call a POST API. But the API is not even being called Below is my code: AsyncHttpClient client = new AsyncHttpClient(); client.addHeader("Key","random-key"); …
Mohamad Mousheimish
  • 1,641
  • 3
  • 16
  • 48
1
vote
1 answer

How to add results of many AsyncHttpClient requests to a list

I am trying to use AsyncHttpClient in order to send multiple requests at once, add each response to a list, and then do some logic on the list once all responses have come back. So far I have: //I have a private static ArrayList lists that I…
skyleguy
  • 979
  • 3
  • 19
  • 35
1
vote
0 answers

asynchttpclient + netty - java.net.ConnectException: General SSLEngine problem

I would like to know the way to ignore certs while making https calls. I am presently getting the following exceptions while making calls using the asyn http client - java.net.ConnectException: General SSLEngine problem The following is my code…
user1619355
  • 429
  • 1
  • 4
  • 17
1
vote
0 answers

Async Http Client + Netty

I am facing issues benchmarking the async http client (version - 2.4.3) and getting the following exception while running the code pasted below. Also just FYI I am new to Netty as well as async-http-client so pardon me in case I have gap in my…
user1619355
  • 429
  • 1
  • 4
  • 17
1
vote
0 answers

Java HttpResponseBodyPart XML parsing error

I am facing below error while getting response from server. org.jdom.input.JDOMParseException: Error on line 1: Content is not allowed in prolog. at org.jdom.input.SAXBuilder.build(SAXBuilder.java:468) at…
Java-Dev
  • 438
  • 4
  • 20
1
vote
0 answers

How to send json data from Android to Asp.net

Help me to post json data from Android to Asp.net Here is my code below. Android sending json data to webapi public class UploadByTableActivity extends Activity { final static String url = "https://webapi.com/api/post/"; HttpResponse…
KBH
  • 1,887
  • 2
  • 11
  • 11
1
vote
0 answers

GET doesn't enter in methods onSucces and onFailure

I'm trying to do a get with AsyncHttpClient, but doesn't enter in both methods, in Postman it's going well, any idea what could be? AsyncHttpClient client = new AsyncHttpClient(); String URL = "http://link/link1/link2"; client.get(URL, new…
Luis
  • 39
  • 1
  • 4
1
vote
1 answer

java.io.IOException connection reset by peer in asynchronous http client

I am using the Apache http asynchronous client library to make parallel HTTP calls and receive the response on a callback. I am getting the following error after my request when the code is deployed on the server. java.io.IOException: Connection…
1
vote
0 answers

Apache HttpAsyncClient thread count configuration

I'm trying to use AsyncRestTemplate with custom Apache HttpAsyncClient. First i used simple new AsyncRestTemplate(); And when i added logs with thread name to future callback i saw that all of them was different (SimpleAsyncTaskExecutor-1..n). Later…
DamienMiheev
  • 998
  • 8
  • 31
1
vote
1 answer

Connect with api in localhost AsyncHttpClient client

My fragment public class UsuarioFragment extends Fragment { JSONObject usuario; View v; String nombreUsuario; String emailUsuario; String tipoUsuario; @Override public View onCreateView(LayoutInflater inflater,…
Teddy
  • 35
  • 5
1
vote
0 answers

java.net.ConnectException: handshake alert: unrecognized_name

I am using the library org.asynchttpclient:async-http-client:2.4.0 to scrape multiple urls of different hosts at the same time. I'm having this issue with the website https://www.westcommunitycu.org/index.shtml where the library fails to get a…
user8520666
1
vote
1 answer

Is it possible to implement a fire-and-forget web request to an Apache webserver with PHP while processing a request

I have a webrequest processing real-time calls (needs processing time within 100ms) and certain operations are taking a long time (250ms). I was checking whether it's possible to fire-and-forget a web request while processing the original request?…
ssk
  • 9,045
  • 26
  • 96
  • 169
1
vote
0 answers

One OnClickListener for multiple dynamically generated button in OnSuccess of AsyncHttpClient

I am facing problem while implementig one OnClickListener for multiple buttons. These buttons are dynamically generated based on the response in the OnSuccess of AsyncHttpClient. If I am writing OnClickListener for each button, everything is…
1
vote
1 answer

Java - AsyncHttpClient - aborting ongoing asynchronous call

I am using HttpAsyncClient in order to GET some urls. In some cases, let's say when I receive status HTTP-304, I would like to abandon the ongoing call. I don't want to wait for body, I don't want to spend the machine resources on it. Is there any…
Pijotrek
  • 2,821
  • 1
  • 18
  • 32