小编ali*_*h95的帖子

使用 rxjava 正确处理所有类型的 Retrofit 错误

我是新手,我要求最好的正确方法来处理 Retrofit 使用中的所有可能状态,其中Rxjava包括:Retrofitrxjavarxbinding

  1. 没有网络连接。
  2. 来自服务器的空响应。
  3. 成功响应。
  4. 错误响应并显示错误消息,如Username or password is incorrect
  5. 其他错误,例如connection reset by peers.

android retrofit2 rx-binding rx-java2

5
推荐指数
1
解决办法
2489
查看次数

标签 统计

android ×1

retrofit2 ×1

rx-binding ×1

rx-java2 ×1