async-http-client
async-http-client copied to clipboard
Asynchronous Http and WebSocket Client library for Java
Soon to be released netty 4.1 will include HTTP/2 codec pack. It would be great if AHC 2.0 would support HTTP/2 natively. examples: https://github.com/netty/netty/tree/4.1/example/src/main/java/io/netty/example/http2
Both **Request timeout** and **Read timeout** throw the same java.util.concurrent.TimeoutException `java.util.concurrent.TimeoutException: Request timeout to www.baidu.com after 3000 ms` it`s not convenient to catch the real exception i suggest to throw...
Can the RemotelyClosedException be made read only, or can a new one be thrown every time? The issue is that the exception is basically static, but is maniplulatable, allowing the...
- Kick off a request. - Close the client by calling `AsyncHttpClient.close()` before the request completes. - Observe that the request's future is never completed (the handler callback is never...
Sometimes AHC is used to interact with crappy servers and full control over headers is required. In AHC 2.1 `Content-Type` header is modified regardless of my input: ``` httpClient.preparePost(authenticationUrl) .setBody(byte[])...
Right now when we reach max connections we just throw an Exception, it would be great if we could make AsyncHttpClient wait a configurable amount of time for a connection...
Hi, I am using AsyncHttpClient version 2.5.2 for my application. I notice that CookieStore will add the cookie when HttpResponse come https://github.com/AsyncHttpClient/async-http-client/blob/master/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Interceptors.java#L73-L82 and use cookie from CookieStore for redirect https://github.com/AsyncHttpClient/async-http-client/blob/master/client/src/main/java/org/asynchttpclient/netty/handler/intercept/Redirect30xInterceptor.java#L129-L136...
When closing streams from async http client that are opened via PipedInputStreams: ``` PipedInputStream pipedInputStream = new PipedInputStream(); PipedOutputStream pipedOutputStream = new PipedOutputStream(pipedInputStream); BodyDeferringAsyncHandler bodyDeferringAsyncHandler = new BodyDeferringAsyncHandler(pipedOutputStream); BoundRequestBuilder getRequestBuilder...
Can't figure how to define a subProtocol ```java WebSocketUpgradeHandler.Builder upgradeHandlerBuilder = new WebSocketUpgradeHandler.Builder(); WebSocketUpgradeHandler wsHandler = upgradeHandlerBuilder .addWebSocketListener(new WebSocketListener() { @Override public void onOpen(WebSocket websocket) { // WebSocket connection opened...
Provide an ImmutableRequestBuilder so addQueryParams/setQueryParams method argument are not mutated
the ```addQueryParams```/```setQueryParams``` methods are assigning the passed argument directly to the class field ```queryParams```. This has unwanted side-effects. Code: [RequestBuilderBase.addQueryParams](https://github.com/AsyncHttpClient/async-http-client/blob/fc7b75048f2cc74e46cd45d1591f1ffa50ac4810/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java#L425) [RequestBuilderBase.setQueryParams](https://github.com/AsyncHttpClient/async-http-client/blob/fc7b75048f2cc74e46cd45d1591f1ffa50ac4810/client/src/main/java/org/asynchttpclient/RequestBuilderBase.java#L439) Example: ```Java List params = new ArrayList(); params.add(new Param("testKey",...