Check also MIGRATION.md for possible compatibility problems.
Removed method contentTypeOfBody from HttpRequestBuilder.
Added method addHttpClientCustomizer into HttpRequestBuilder
Removed inputStreamDeserializer from ResponseDeserializer. Reason: Response should be deserialized
by ResponseDeserializer
Renamed ignorableDeserializer of ResponseDeserializer to toStringDeserializer
Due to the fact that old implementation was designed only for one predefined URI and wasn't much flexible the 2.x.x
version don't have back compatibility with version 1.x.x. The 1.x.x versions will be supported in branch 1.x.x_support
.
The method getContentAsString of ResponseBodyReaderContext become deprecated and will be removed in further
versions.
The ResponseBodyReaderContext become generic.
The path method of WebTarget now adds path to existed path instead of replacing, for replace use setPath method.
Headers are available from ResponseHandler
-
Starting with 3.3.0 can be used immutable web target.
HttpRequest.immutableTarget(uri) -
Now request methods supported an auto-serializing object to body for content types
application/jsonandapplication/xml -
Added
ResponseHandler.recuiredGet()method.
Added methods ClientBuilder.enableCookieManagement, ClientBuilder.enableAutomaticRetries and
ClientBuilder.setConnectionTimeToLive.
Added methods ClientBuilder.addDefaultConnectionManagerBuilderCustomizer.
- Charset handling was clarified and split:
WebTarget#setCharset(Charset)now sets both URI charset and request body charset.- Added
WebTarget#setUriCharset(Charset)to control only URI encoding charset. - Added
WebTarget#setBodyCharset(Charset)to control only request body charset used by request body converters.
- Default charset for both URI and body is
UTF-8.