For building HttpRequest you should use addContentType
instead of contentTypeOfBody
.
Replace ignorableDeserializer
of ResponseDeserializer
to toStringDeserializer
The 2.x.x version don't have back compatibility with version 1.x.x.
Replace getType
of ResponseBodyReaderContext
to getGenericType
.
The method getType
of ResponseBodyReaderContext
now returns Class the type that is to be read from the entity
stream.
Replace setUseDefaultReader(boolean useDefaultReader)
of HttpRequestBuilder
to enableDefaultBodyReader
or disableDefaultBodyReader
Rename method path
of WebTarget
to setPath
. The path
method now adds path to existed path instead of replacing,
for replace use setPath
method.
Replace all org.apache.http
package's classes by appropriate httpclient5 classes.
Rename anywhere getAllHeaders
method by getHeaders
.
Methods getStatusCode
of classes Response
and ResponseHandler
become deprecated use getCode
instead.
When building http client by ClientBuilder
the default connect timeout increased from 5 to 10 seconds.
Remove methods with explicit body that typically do not include a body e.g WebTarget.get(String)
,
WebTarget.head(String)
Support with WebTarget.request(HttpMethod, HttpEntity)
still present.
Rename addDefaultDateDeserializationPattern
of HttpRequestBuilder
has been renamed to
addResponseDefaultDateDeserializationPattern
.
Removed support default deserialization of joda.time module. To achieve that, provide custom Json or Xml mapper e.g(
HttpRequestBuilder.setDefaultJsonMapper(mapper)
) or use custom response deserializer.