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:
maxTotalConnectionsbecomesmaxConnectionsmaxConnectionPerHostbecomesmaxConnectionsPerHostconnectionTimeOutInMsbecomesconnectTimeoutwebSocketIdleTimeoutInMsbecomeswebSocketTimeoutidleConnectionInPoolTimeoutInMsbecomespooledConnectionIdleTimeoutidleConnectionTimeoutInMsbecomesreadTimeoutrequestTimeoutInMsbecomesrequestTimeoutmaxConnectionLifeTimeInMsbecomesconnectionTTLredirectEnabledbecomesfollowRedirectallowPoolingConnectionbecomesallowPoolingConnectionsallowSslConnectionPoolbecomesallowPoolingSslConnectionsconnectionTimeoutbecomesconnectTimeoutcompressionEnabledbecomescompressionEnforced. Default false, so AHC only honors user defined Accept-Encoding.requestCompressionLevelwas dropped, as it wasn't workingSSLEngineFactorywas moved to Netty config as only Netty honors ituseRawUrlbecomesdisableUrlEncodingForBoundedRequests, as it's only honored by bound requestsgetAllowPoolingConnectionbecomesisAllowPoolingConnection
- Drop
PerRequestConfig.requestTimeOutandproxycan now be directly set on the request. - Drop
java.net.URIin favor of owncom.ning.http.client.uri.Uri. You can usetoJavaNetURIto convert. - Drop
Proxy.getURIin favor ofgetUrl - Drop deprecated methods:
RequestandRequestBuilderBase'sgetReqTypein favor ofgetMethod,Request.getLengthin favor ofgetContentLength - Drop deprecated
RealmBuilder.getDomainin favor ofgetNtlmDomain - Rename
xxxParameter(add, set, get...) intoxxxFormParam - Rename
xxxQueryParameter(add, set, get...) intoxxxQueryParam - Merge
boolean Request.isRedirectEnabledandboolean isRedirectOverrideSetare merged intoBoolean isRedirectEnabled - Remove url parameter from
SignatureCalculator.calculateAndAddSignature, as it can be fetched on the request parameter - Rename
com.ning.http.client.websocketpackage intocom.ning.http.client.ws - WebSocket Listeners now have to implement proper interfaces to be notified or fragment events:
WebSocketByteFragmentListenerandWebSocketTextFragmentListener - Rename WebSocket's
sendTextMessageintosendMessageandstreamTextintostream - Rename NettyAsyncHttpProviderConfig's
handshakeTimeoutInMillisintohandshakeTimeout - 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
replaceintoreplaceWithto not conflict with new JDK8 Map methods - execute no longer throws Exceptions, all of them are notified to the handler/future