Retrofit2.2最新版本發(fā)布

今天 Retrofit2.2最新版本發(fā)布,以下為此次更新內(nèi)容:

Version 2.2.0 (2017-02-21)

  • RxJava 2.x is now supported with a first-party 'adapter-rxjava2' artifact.
    (支持rxJava2了, 使用適配器:compile 'com.squareup.retrofit2:adapter-rxjava2:2.2.0')

  • 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 Mosh.

最后編輯于
?著作權歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容