retrofit v2.0.0-beta4 Release Notes
Release Date: 2016-02-04 // about 8 years ago-
- New:
Call
instance is now passed to bothonResponse
andonFailure
methods ofCallback
. This aids in detecting whenonFailure
is called as a result ofCall.cancel()
by checkingCall.isCanceled()
. - New:
Call.request()
returns (optionally creating) theRequest
object for the call. Note: If this is called beforeCall.execute()
orCall.enqueue()
this will do relatively expensive work synchronously. Doing so in performance-critical sections (like on the Android main thread) should be avoided. - New: Support for the release version of OkHttp 3.0 and newer.
- New:
adapter-guava
module provides aCallAdapter.Factory
for Guava'sListenableFuture
. - New:
adapter-java8
module provides aCallAdapter.Factory
for Java 8'sCompleteableFuture
. - New:
ScalarsConverterFactory
(fromconverter-scalars
module) now supports parsing response bodies into eitherString
, the 8 primitive types, or the 8 boxed primitive types. - New: Automatic support for sending callbacks to the iOS main thread when running via RoboVM.
- New: Method annotations are now passed to the factory for request body converters. This allows converters to alter the structure of both request bodies and response bodies with a single method-level annotation.
- Each converter has been moved to its own package under
retrofit2.converter.<name>
. This prevents type collisions when many converters are simultaneously in use. - Fix: Exceptions thrown when unable to locate a
CallAdapter.Factory
for a method return type now correctly list theCallAdapter.Factory
instances checked. - Fix: Ensure default methods on service interfaces can be invoked.
- Fix: Correctly resolve the generic parameter types of collection interfaces when subclasses of those collections are used as method parameters.
- Fix: Do not encode
/
characters in@Path
replacements whenencoded = true
.
- New: