【发布时间】:2018-08-30 07:17:40
【问题描述】:
如何确保对 Retrofit 原因请求的调用 cancel() 不会传送到服务器?
目前我知道,在 Retrofit 上调用取消将调用回调的 onFailure 分支。然后我可以检查失败的原因是否是因为呼叫被取消了。 https://futurestud.io/tutorials/retrofit-2-cancel-requests
但是我可以确定,该请求没有到达服务器吗?
【问题讨论】:
-
你能不检查状态码得出结论吗?还要检查square.github.io/retrofit/2.x/retrofit/retrofit2/…
标签: android retrofit retrofit2