Retrofit 2.3.0 发布,Android 的 REST 客户端

栏目: 编程工具 · 发布时间: 8年前

内容简介:Retrofit 2.3.0 发布,Android 的 REST 客户端

Retrofit 2.3.0 发布了,Retrofit 是一个类型安全的 REST 客户端,用于 Android 平台。

更新内容:

  • Retrofit now uses  @Nullable  to annotate all possibly-null values. We've added a compile-time dependency on the JSR 305 annotations. This is a  provided dependency and does not need to be included in your build configuration,  .jar file, or  .apk . We use  @ParametersAreNonnullByDefault and all parameters and return types are never null unless explicitly annotated  @Nullable .

    Warning: this release is source-incompatible for Kotlin users.Nullability was previously ambiguous and lenient but now the compiler will enforce strict null checks.

  • New: Converters added for Java 8's and Guava's Optional which wrap a potentially-nullable response body. These converters still rely on normal serialization library converters for parsing the response bytes into an object.

  • New: String converters that return null for an  @Query or  @Field parameter are now skipped.

  • New: The mock module's NetworkBehavior now throws a custom subclass of  IOException to more clearly indicate the exception's source.

  • RxJava 1.x converter updated to 1.3.0 which stabilizes the use of Completable .

  • Fix: Add explicit handling for OnCompleteFailedExceptionOnErrorFailedException , and OnErrorNotImplementedException for RxJava 1.x to ensure they're correct delivered to the plugins/hooks for handling.

  • Fix: NoSuchElementException thrown when unsubscribing from an RxJava 1.x  Single .

下载地址:


以上所述就是小编给大家介绍的《Retrofit 2.3.0 发布,Android 的 REST 客户端》,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对 码农网 的支持!

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

读屏时代

读屏时代

(美)Naomi S. Baron(内奥米·S.巴伦) / 庞洋 / 电子工业出版社 / 2016-7 / 55.00

书中作者探讨了技术如何重塑人们对阅读的定义。数字阅读越来越受欢迎,更便利、节约成本、并把免费书籍提供给全世界的读者。但是,作者也指出其弊处在于读者很容易被设备上的其他诱惑分心、经常走马观花而非深入阅读。更重要的是,人们阅读方式的变化会影响了作者的写作方式。为了迎合人们阅读习惯的转变,许多作家和出版商的作品越来越短小和碎片化,或者更青睐无需思考和细读的作品。作者比较了纸质阅读和在线阅读的重要性,包括......一起来看看 《读屏时代》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

图片转BASE64编码
图片转BASE64编码

在线图片转Base64编码工具