retrofit v2.2.0 Release Notes

Release Date: 2017-02-21 // almost 3 years ago
    • RxJava 2.x is now supported with a first-party 'adapter-rxjava2' artifact.
    • New: @QueryName annotation allows creating a query parameter with no '=' separator or value.
    • New: Support for messages generated by Protobuf 3.0 or newer when using the converter for Google's protobuf.
    • New: RxJava 1.x call adapter now correctly handles broken subscribers whose methods throw exceptions.
    • New: Add toString() implementations for Response and Result.
    • New: The Moshi converter factory now offers methods for enabling null serialization and lenient parsing.
    • New: Add createAsync() to RxJava 1.x call adapter factory which executes requests using Call.enqueue() using the underlying HTTP client's asynchronous support.
    • New: NetworkBehavior now allows setting an error percentage and returns HTTP errors when triggered.
    • HttpException has been moved into the main artifact and should be used instead of the versions embedded in each adapter (which have been deprecated).
    • Promote the response body generic type on CallAdapter from the adapt method to the enclosing class. This is a source-incompatible but binary-compatible change which is only relevant if you are implementing your own CallAdapters.
    • Remove explicit handling of the now-defunct RoboVM platform.
    • Fix: Close response on HTTP 204 and 205 to avoid resource leak.
    • Fix: Reflect the canceled state of the HTTP client's Call in Retrofit's Call.
    • Fix: Use supplied string converters for the String type on non-body parameters. This allows user converters to handle cases such as when annotating string parameters instead of them always using the raw string.
    • Fix: Skip a UTF-8 BOM (if present) when using the converter for Moshi.