AsyncHttpClient v1.9 is a preview of v2, so it comes with some breaking changes.
- Target JDK7, drop support for JDK5 and JDK6
- Rename many AsyncHttpClientConfig parameters:
maxTotalConnections
becomesmaxConnections
maxConnectionPerHost
becomesmaxConnectionsPerHost
connectionTimeOutInMs
becomesconnectTimeout
webSocketIdleTimeoutInMs
becomeswebSocketTimeout
idleConnectionInPoolTimeoutInMs
becomespooledConnectionIdleTimeout
idleConnectionTimeoutInMs
becomesreadTimeout
requestTimeoutInMs
becomesrequestTimeout
maxConnectionLifeTimeInMs
becomesconnectionTTL
redirectEnabled
becomesfollowRedirect
allowPoolingConnection
becomesallowPoolingConnections
allowSslConnectionPool
becomesallowPoolingSslConnections
connectionTimeout
becomesconnectTimeout
compressionEnabled
becomescompressionEnforced
(default true) so it's always enabled and can honor user defined Accept-EncodingrequestCompressionLevel
was dropped, as it wasn't workingSSLEngineFactory
was moved to Netty config as only Netty honors ituseRawUrl
becomesdisableUrlEncodingForBoundedRequests
, as it's only honored by bound requestsgetAllowPoolingConnection
becomesisAllowPoolingConnection
- Drop
PerRequestConfig
.requestTimeOut
andproxy
can now be directly set on the request. - Drop
java.net.URI
in favor of owncom.ning.http.client.uri.Uri
. You can usetoJavaNetURI
to convert. - Drop
Proxy.getURI
in favor ofgetUrl
- Drop deprecated methods:
Request
andRequestBuilderBase
'sgetReqType
in favor ofgetMethod
,Request.getLength
in favor ofgetContentLength
- Drop deprecated
RealmBuilder.getDomain
in favor ofgetNtlmDomain
- Rename
xxxParameter
(add, set, get...) intoxxxFormParam
- Rename
xxxQueryParameter
(add, set, get...) intoxxxQueryParam
- Merge
boolean Request.isRedirectEnabled
andboolean isRedirectOverrideSet
are merged intoBoolean isRedirectEnabled
- Remove url parameter from
SignatureCalculator.calculateAndAddSignature
, as it can be fetched on the request parameter - Rename
com.ning.http.client.websocket
package intocom.ning.http.client.ws
- WebSocket Listeners now have to implement proper interfaces to be notified or fragment events:
WebSocketByteFragmentListener
andWebSocketTextFragmentListener
- Rename WebSocket's
sendTextMessage
intosendMessage
andstreamText
intostream
- Rename NettyAsyncHttpProviderConfig's
handshakeTimeoutInMillis
intohandshakeTimeout
- Netty provider now creates SslEngines instances with proper hoststring and port.
- Parts, Realm and ProxyServer now take a java.nio.Charset instead of a String charset name
- New AsyncHandlerExtensions methods:
onOpenConnection
,onConnectionOpen
,onPoolConnection
,onConnectionPooled
,onSendRequest
,onDnsResolved
,onSslHandshakeCompleted
- Rename FluentCaseInsensitiveStringsMap and FluentStringsMap
replace
intoreplaceWith
to not conflict with new JDK8 Map methods - execute no longer throws Exceptions, all of them are notified to the handler/future