We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
针对RxJava的适配 可以参考下文档
Observable, Observable<Response>, and Observable<Result> where T is the body type.
Flowable, Flowable<Response> and Flowable<Result> where T is the body type.
Single, Single<Response>, and Single<Result> where T is the body type.
Maybe, Maybe<Response>, and Maybe<Result> where T is the body type.
Completable where response bodies are discarded. 对于不关心返回数据的可以直接用Completable
那针对状态码204,是判定为成功吗? 回答是是! 参考源码 对于状态码成功的判断,是照抄okhttp3.Response 源码不翻了,有文档先看文档吧 OK,状态码是2XX的都判成功,放心了。
相关资料
retrofit2的Response
okhttp3的response文档
模拟器和本机是一个小型内置局域网,本机能访问的问题,安卓模拟器访问都没问题。 一直以来相安无事 这次问题来了。我安卓要连本机的服务 一开始我用localhost,显然不行,localhost不是安卓本机嘛。 查下资料。 所有本机的IP都会解析为 10.0.2.2
The text was updated successfully, but these errors were encountered:
No branches or pull requests
怎么处理无数据的返回?
针对RxJava的适配
可以参考下文档
Observable, Observable<Response>, and Observable<Result> where T is the body type.
Flowable, Flowable<Response> and Flowable<Result> where T is the body type.
Single, Single<Response>, and Single<Result> where T is the body type.
Maybe, Maybe<Response>, and Maybe<Result> where T is the body type.
Completable where response bodies are discarded.
对于不关心返回数据的可以直接用Completable
状态码和结果的关联性
那针对状态码204,是判定为成功吗?
回答是是!
参考源码
对于状态码成功的判断,是照抄okhttp3.Response
源码不翻了,有文档先看文档吧
OK,状态码是2XX的都判成功,放心了。
相关资料
retrofit2的Response
okhttp3的response文档
顺手牵羊之安卓模拟器连本机服务
模拟器和本机是一个小型内置局域网,本机能访问的问题,安卓模拟器访问都没问题。
一直以来相安无事
这次问题来了。我安卓要连本机的服务
一开始我用localhost,显然不行,localhost不是安卓本机嘛。
查下资料。
所有本机的IP都会解析为 10.0.2.2
The text was updated successfully, but these errors were encountered: