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

Java8 Parallel HTTP calls

First thing first, this question is for Java8. Having said that, let's go to the problem in hand. I have to make 2000 http calls with different parameters. Below is the URL https://stat.ripe.net/data/looking-glass/data.json?resource=IP-PREFIX The…
Tahir Rauf
  • 484
  • 6
  • 16
0
votes
1 answer

Call multiple JsonHttpResponseHandler but only one onFinish

I created a layout in my app where I have multiple checkboxes and once the user checked some and clicks ok, I search it via a jsonHttpResponse (each iteration is an item that was checked): for (int i = 0; i < items.size(); i++) { String itemID =…
Ben
  • 1,737
  • 2
  • 30
  • 61
0
votes
0 answers

Android Kotlin - loopj AsyncHttpClient not working with ssl / https on older APIs

val params = RequestParams() params.put("userid", prefs!!.getLong("userid", 0)) params.put("lastid", lastID) val client = AsyncHttpClient() client.post("$domain/xxx.php", params, object : JsonHttpResponseHandler() { override fun…
user12880465
0
votes
1 answer

Is it possible to abort the http request[GET, POST, etc] in HttpAsynClient from HttpClient-5.x?

I'm using org.apache.hc.client5.http.impl.async.HttpAsyncClients.create() to create org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient for my HTTP/2 requests. I'm looking for some functionality to abort the request after reading some…
0
votes
0 answers

Initializing AsyncHttpClient crashes with ExceptionInInitializerError in Android Pie and newer

In Android Studio 3.6.2 I get an "ExceptionInInitializerError" and "java.lang.RuntimeException: Stub!", on this line of code: private static AsyncHttpClient client = new AsyncHttpClient(); Which happens only in Android Pie devices and Android Q…
Josh
  • 6,251
  • 2
  • 46
  • 73
0
votes
0 answers

Making async http calls from within spring-webflux

We have a Spring Webflux based application, which returns a flux response. The application itself makes blocking calls to downstream services, and essentially acts as an aggregator. Each downstream request is a blocking HTTP POST request, and can…
tsar2512
  • 2,826
  • 3
  • 33
  • 61
0
votes
0 answers

How to wait and execute code after AsyncHttpClient() Done?

I want to take data from API using AsyncHttpClient(), after that, I show the data to recycle view. but when trying to debug my code is run show the data to recycle view which is no data because not yet finish setData using AsyncHttpClient(). my…
0
votes
0 answers

Why JSON data is not Loading in Android "Lollipop" as a JSONObject

Currently, I'm Working on the Running project, there i got a problem, The problem is JSON data is not loaded in the lower version of android. now i test on two devices, the code is working good on Android 10 but it calls the onFailure method in…
Imran Sk
  • 303
  • 5
  • 17
0
votes
0 answers

Can we print exact URL that goes to Server in AsyncHttpClient Android?

I have an instance of AsyncHttpClient and i want to print the complete request that goes to the Server. private static AsyncHttpClient client = new AsyncHttpClient(); public static void post(String url, RequestParams params,…
Shivam
  • 29
  • 11
0
votes
1 answer

Why doesn't AsyncHttpClient close the thread after throwing an exception?

I'm using the Zendesk Java Client. When I supply the correct credentials, it works as expected. However, I stumbled on a scenario where if the wrong credentials are passed in, the thread just hangs and it throws an error. Whether I run the code with…
N4v
  • 793
  • 8
  • 18
0
votes
1 answer

AsyncHttpClient creates too many AsyncHttpClient-timer threads

I am using AsyncHttpClient 2.3.0 and Default configuration. I've noticed that AHC created two types of threads (from the thread dump): 1) AsyncHttpClient-timer-478-1" - Thread t@30390 java.lang.Thread.State: TIMED_WAITING at…
Mike Mike
  • 598
  • 7
  • 15
0
votes
1 answer

Is there a significant difference between using the tornado's AsyncHTTPClient v.s. wrapping blocking http calls in run_in_executor()?

I am attempting to use the library s3fs in a tornado application. The easiest approach would be to make a small function that fetches some data from s3 (using s3fs) and wrap that in run_in_executor(). Is there any advantage to writing a custom…
chaimp
  • 16,897
  • 16
  • 53
  • 86
0
votes
2 answers

AsyncHttpClient failed to connect to post URL on android 9

I am getting some strange problem with SyncHttpClient library. It is working fine on device below android 9 but my code unable to make a rest call to URL. Here is my sample code: import com.loopj.android.http.*; AsyncHttpClient client = new…
user565
  • 871
  • 1
  • 22
  • 47
0
votes
1 answer

AsyncHttpClient don't work in Android 4.4 Kitkat

I am using com.loopj.android.http.AsyncHttpClient for my https request to server : AsyncHttpClient client = new AsyncHttpClient(); String url = Const.URL; client.setTimeout(60000); client.get(url, new MyJsonHttpResponseHandler("FirstConnect",…
0
votes
0 answers

AsyncHttpClient/curl command execution through java is not giving properly result

I have a curl command like below (sample one) curl -v https://my-ip/sample/v1/map/1?name=sat&id=123&code=AE123, ER345 When I execute above curl command directly its giving complete response(contains more than 2 pages) but when I am executing the…
Sat
  • 3,520
  • 9
  • 39
  • 66