Skip to content

Commit 15e4e65

Browse files
author
Stephane Landelle
committed
1.9 migration guide
1 parent 9802ce7 commit 15e4e65

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

MIGRATION.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
Migration Guide
2+
---------------
3+
4+
## From 1.8 to 1.9
5+
6+
AsyncHttpClient v1.9 is a preview of v2, so it comes with some breaking changes.
7+
8+
* Target JDK7, drop support for JDK5 and JDK6
9+
* Rename many AsyncHttpClientConfig parameters:
10+
* `maxTotalConnections` becomes `maxConnections`
11+
* `maxConnectionPerHost` becomes `maxConnectionsPerHost`
12+
* `connectionTimeOutInMs` becomes `connectTimeout`
13+
* `webSocketIdleTimeoutInMs` becomes `webSocketTimeout`
14+
* `idleConnectionInPoolTimeoutInMs` becomes `pooledConnectionIdleTimeout`
15+
* `idleConnectionTimeoutInMs` becomes `readTimeout`
16+
* `requestTimeoutInMs` becomes `requestTimeout`
17+
* `maxConnectionLifeTimeInMs` becomes `connectionTTL`
18+
* `redirectEnabled` becomes `followRedirect`
19+
* `allowPoolingConnection` becomes `allowPoolingConnections`
20+
* `allowSslConnectionPool` becomes `allowPoolingSslConnections`
21+
* `connectionTimeout` becomes `connectTimeout`
22+
* `compressionEnabled` becomes `compressionEnforced` (default true) so it's always enabled and can honor user defined Accept-Encoding
23+
* `useRawUrl` becomes `disableUrlEncodingForBoundedRequests`, as it's only honored by bound requests
24+
* `getAllowPoolingConnection` becomes `isAllowPoolingConnection`
25+
* Drop `PerRequestConfig`. `requestTimeOut` and `proxy` can now be directly set on the request.
26+
* Drop `java.net.URI` in favor of own `com.ning.http.client.uri.Uri`. You can use `toJavaNetURI` to convert.
27+
* Drop `Proxy.getURI` in favor of `getUrl`
28+
* Drop deprecated methods: `Request` and `RequestBuilderBase`'s `getReqType` in favor of `getMethod`, `Request.getLength` in favor of `getContentLength`
29+
* Drop deprecated `RealmBuilder.getDomain` in favor of `getNtlmDomain`
30+
* Rename `xxxParameter` (add, set, get...) into `xxxFormParam`
31+
* Rename `xxxQueryParameter` (add, set, get...) into `xxxQueryParam`
32+
* Merge `boolean Request.isRedirectEnabled` and `boolean isRedirectOverrideSet` are merged into `Boolean isRedirectEnabled`
33+
* Remove url parameter from `SignatureCalculator.calculateAndAddSignature`, as it can be fetched on the request parameter
34+
* Rename `com.ning.http.client.websocket` package into `com.ning.http.client.ws`
35+
* WebSocket Listeners now have to implement proper interfaces to be notified or fragment events: `WebSocketByteFragmentListener` and `WebSocketTextFragmentListener`
36+
* Rename WebSocket's `sendTextMessage` into `sendMessage` and `streamText` into `stream`
37+
* Rename NettyAsyncHttpProviderConfig's `handshakeTimeoutInMillis` into `handshakeTimeout`
38+
* Netty provider now creates SslEngines instances with proper hoststring and port.
39+
* Parts, Realm and ProxyServer now take a java.nio.Charset instead of a String charset name
40+
* New AsyncHandlerExtensions methods:
41+
* `onOpenConnection`,
42+
* `onConnectionOpen`,
43+
* `onPoolConnection`,
44+
* `onConnectionPooled`,
45+
* `onSendRequest`,
46+
* `onDnsResolved`,
47+
* `onSslHandshakeCompleted`
48+
* Rename FluentCaseInsensitiveStringsMap and FluentStringsMap `replace` into `replaceWith` to not conflict with new JDK8 Map methods
49+
* execute no longer throws Exceptions, all of them are notified to the handler/future

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,12 @@ Async Http Client library purpose is to allow Java applications to easily execut
1010
<dependency>
1111
<groupId>com.ning</groupId>
1212
<artifactId>async-http-client</artifactId>
13-
<version>1.8.15</version>
13+
<version>1.9.0</version>
1414
</dependency>
1515
```
1616

17+
Check [migration guide](MIGRATION.md) for migrating from 1.8 to 1.9.
18+
1719
You can also download the artifact
1820

1921
[Maven Search](http://search.maven.org)

0 commit comments

Comments
 (0)