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

How to use credentials in HttpClient in c#?

I am facing some problems when using the HttpClient class to access to a Delicious API. I have the following code: try { const string uriSources = "https://api.del.icio.us/v1/tags/bundles/all?private={myKey}"; using (var handler = new…
16
votes
4 answers

How to set cookie in android WebView client

I want to call one specific url via WebView. The page can only be called after user already logged in. I use AsyncHttpClient library to perform login call. Once after successfully logged in , loading url via WebView doesn't seem recognise the proper…
Tixeon
  • 493
  • 1
  • 4
  • 9
11
votes
1 answer

Async Http Client what is the difference between readTimeout and requestTimeout

I'm trying to understand the difference between: setRequestTimeout - Set the maximum time in millisecond an AsyncHttpClient waits until the response is completed. setReadTimeout - Set the maximum time in millisecond an AsyncHttpClient can stay…
tekumara
  • 8,357
  • 10
  • 57
  • 69
11
votes
1 answer

How do I get a CompletableFuture from an Async Http Client request?

On Async Http Client documentation I see how to get a Future as the result of an asynchronous HTTP Get request simply doing, for example: AsyncHttpClient asyncHttpClient = new DefaultAsyncHttpClient(); Future f =…
Miguel Gamboa
  • 8,855
  • 7
  • 47
  • 94
11
votes
2 answers

Does AsyncHttpClient knows how many threads to allocate for all the HTTP requests

I'm evaluating AsyncHttpClient for big loads (~1M HTTP requests). For each request I would like to invoke a callback using the AsyncCompletionHandler which will just insert the result into a blocking queue My question is: if I'm sending asynchronous…
Gideon
  • 2,211
  • 5
  • 29
  • 47
10
votes
3 answers

PostAsync HttpClient error with Web Api - System.AggregateException "A task was canceled."

I'm trying to call PostAsync method using System.Net.Http.HttpClient from the Web API. I get the following error: System.AggregateException "A task was canceled." Task: Id = 1, Status = System.Threading.Tasks.TaskStatus.Canceled, Method =…
pfeds
  • 2,183
  • 4
  • 32
  • 48
7
votes
1 answer

Java AsyncHttpClient: broken file while writing from LazyResponseBodyPart to AsynchronousFileChannel

I use AsyncHttpClient library for async non blocking requests. My case: write data to a file as it is received over the network. For download file from remote host and save to file I used default ResponseBodyPartFactory.EAGER and…
Peter Kozlovsky
  • 633
  • 2
  • 10
  • 28
7
votes
2 answers

Apache async HttpClient not fast

I am pretty new to Apache http client and am trying to get status code from a website. Found the following example on Apache http tutorial. import java.util.concurrent.CountDownLatch; import org.apache.http.HttpResponse; import…
Harshit
  • 711
  • 1
  • 9
  • 29
7
votes
2 answers

How do I shutdown and reconfigure an AsyncHttpClient that is using NettyAsyncHttpProvider

I'm constructing an AsyncHttpClient like this: public AsyncHttpClient getAsyncHttpClient() { AsyncHttpClientConfig config = new AsyncHttpClientConfig.Builder() .setProxyServer(makeProxyServer()) …
kbyrd
  • 3,321
  • 27
  • 41
6
votes
2 answers

Why AsyncHttpClient keep logging "Entry count for : [URL] : 1" after sending request?

Here's the code I am using AsyncHttpClient asyncHttpClient = asyncHttpClient(); RequestBuilder builder = new RequestBuilder("PUT"); Request request = builder.setUrl("http://localhost:8080") .setBody(requestBody) …
Basemm
  • 1,204
  • 14
  • 16
6
votes
2 answers

akka-http no stack trace or details on error

I got a structure which can basically be summarized as: outside user makes a rest request to akka-http server akka-http makes a request(query?) to a (some)data source using asynchttpclient akka-http transforms the result from asynchttpclient and…
kali
  • 1,143
  • 1
  • 9
  • 26
6
votes
2 answers

IllegalAccessError in Spark caused by async-http-client

Context: I am working on a Spark streaming job that writes data to InfluxDB, using this library. Here's the environment. Scala 2.11.8 Spark 2.1.0 (Dockerized standalone cluster) relevant dependencies: "org.apache.spark" %% "spark-core" % "2.1.0"…
tamatama
  • 113
  • 8
6
votes
4 answers

Java returning before tasks complete

I have a method and it calls another method, for which the result is not important. To be exact, it is a POST request to a web service and the result is processed in that method and not in the calling method. Now I want the main method to return…
Kevin Wu
  • 1,357
  • 1
  • 15
  • 34
6
votes
2 answers

Scala Websocket Client?

I am looking for a Scala WebSocket client. There are a number of examples, gists and artefacts but most of them don't work (anymore?) and none of them seem to be maintained. A Scala wrapper around AsyncHttpClient would do fine. Thanks for any…
ticofab
  • 7,551
  • 13
  • 49
  • 90
6
votes
1 answer

How to close AsyncHttpClient with Netty for an asynchronous Http request?

Using the AsyncHttpClient with Netty provider will prevent the main program to terminate when we execute an asynchronous request. For instance, the following program terminates after the println, or not, depending on whether the provider is…
Miguel Gamboa
  • 8,855
  • 7
  • 47
  • 94
1
2 3
21 22