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
6
votes
3 answers

Android AsyncHttpClient, unable to find symbol class Header

I'm trying to create asynchronous rest call in Android using a library com.loopj.android.http.AsyncHttpClient however, i'm unable to implement AsyncHttpResponseHandler's overridden methods because Android Studio cannot find an appropriate import for…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
6
votes
1 answer

Difference between HttpClient.GetStringAsync and WebClient.DownloadStringAsync

I have the following code static void Main(string[] args) { string url = "http://www.google.com"; Console.WriteLine(GetUrl(url).Result); // throws TaskCanceledException Console.WriteLine(GetUrl2(url).Result); } …
enrique7mc
  • 897
  • 9
  • 13
6
votes
3 answers

HttpClient async requests not completing for large batch sent out in a loop

I think I've managed to make a test that shows this problem repeatably, at least on my system. This question relates to HttpClient being used for a bad endpoint (nonexistant endpoint, the target is down). The problem is that the number of completed…
Elliot
  • 2,002
  • 1
  • 20
  • 20
6
votes
5 answers

Internal Server Error when doing a POST with HttpClient in Windows Phone 8

I am posting a string to a web server this way: private async Task makeRequest(string url, string postData) { HttpClient client = null; HttpResponseMessage response = null; try { client = new…
5
votes
0 answers

Is there a swagger-codegen extension that generates asynchttp clients in java?

I am trying to use swagger-codegen for the first time to automatically generate java clients for my REST service. I downloaded the the cli and ran this command: java -jar ~/Downloads/swagger-codegen-cli-2.2.1.jar generate \ -i…
5
votes
2 answers

CompletableFuture for child requests

I am trying to understand CompletableFuture in Java 8. As a part of it, I am trying to make some REST calls to solidify my understanding. I am using this library to make REST calls: https://github.com/AsyncHttpClient/async-http-client. Please note,…
Vinod Mohanan
  • 3,729
  • 2
  • 17
  • 25
5
votes
1 answer

Netty handshake timeout for large request body when used with proxy server

I am calling an email marketing service with a huge body(html). The size of the body = 117184. I am using AsyncHttpClient which uses Netty as background. When I call the request directly, it is successful but it fails with the following exception…
N A
  • 831
  • 2
  • 8
  • 28
5
votes
4 answers

How to convert curl request to HttpClient

I have a curl request that looks like this: curl -i -XPOST 'http://my_url:port/write?db=myDb' -u user:xxxxx --data-binary 'FieldName,host=M.233 value=52.666 timestamp' I'm trying to post this request using HttpClient. I'm not sure how exactly I…
Sonja
  • 316
  • 1
  • 4
  • 13
5
votes
3 answers

Setup AsyncHttpClient to use HTTPS

I am using com.loopj.android:android-async-http:1.4.9 for my request to server. It was working fine until I SSL/TLS is required in my server. So I need to modify my AsyncHTTPClient to use HTTPS in all URLs. I checked this similar how to make HTTPS…
user1506104
  • 6,554
  • 4
  • 71
  • 89
5
votes
2 answers

RestTemplate for AsyncHttpClient

After some benchmarking I've found that AsyncHttpClient (https://github.com/AsyncHttpClient/async-http-client) seems to be the most stable and scalable async http client out there as it's based on NIO and seems to scale very well during load. I…
Billybong
  • 697
  • 5
  • 18
5
votes
1 answer

How to wait for all requests to finish

I am using ning AsyncHttpClient from a command line program. I need to wait for all requests to end so I can safely call close() on the client. The challenge is that I make many requests from many different parts of the program. Stripped own code…
RajV
  • 6,860
  • 8
  • 44
  • 62
5
votes
2 answers

How to post JSON with HttpClient using C#?

I have no idea how to POST JSON with HttpClient. I find some solution, like this, but I have to use HttpClient, cause of async and have to add a header. This is my code below. Any idea how to fix it? List list = new List { new Order()…
Louis
  • 123
  • 1
  • 3
  • 11
5
votes
2 answers

Problems tracking down network "stability" issue roots

I got app which does some networking based on user activity. Usual payload sent by the app is 100-200 bytes so basically no heavy lifting tasks. These tasks are usually working w/o any problems (statistically 99,9% or requests are fine), but aside…
Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
5
votes
2 answers

How to handle data from httpclient

I'm working on a new Windows Phone 8 app. I'm connecting to a webservice which returns valid json data. I'm using longlistselector to display the data. This works fine when i'm using the string json in GetAccountList(); but when receiving data from…
marlonlaan
  • 127
  • 1
  • 2
  • 10
5
votes
2 answers

can AsyncHttpClient perform non-blocking, async HTTP calls?

All, I am trying to decide whether to use NodeJS or Java for my application. I will be communicating with CouchDB over HTTP and would like an asynchronous non-blocking design where my application thread can process additional requests while it waits…
conorgil
  • 355
  • 2
  • 13
1
2
3
21 22