-
-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
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
Xhttp 请求生命周期绑定 #29
Comments
正常XHttp请求都可以啊,文档里都有啊,下面是上传的请求,里面就有啊
|
好吧,我使用了execute(CallBack callBack)这个直接返回的是Disposable类型,所以无法绑定生命周期compose函数 |
大佬,请问有时间看看下我给你GitHub提issuse吗?确实不知道怎么处理了,谢谢
…------------------ 原始邮件 ------------------
发件人: ***@***.***>;
发送时间: 2021年12月15日(星期三) 凌晨1:27
收件人: ***@***.***>;
抄送: ***@***.***>; ***@***.***>;
主题: Re: [xuexiangjys/XHttp2] Xhttp 请求生命周期绑定 (Issue #29)
正常XHttp请求都可以啊,文档里都有啊,下面是上传的请求,里面就有啊
mIProgressLoader.updateMessage("上传中..."); XHttp.post("/book/uploadBookPicture") .params("bookId", book.getBookId()) .uploadFile("file", FileUtils.getFileByPath(mPicturePath), new IProgressResponseCallBack() { @OverRide public void onResponseProgress(long bytesWritten, long contentLength, boolean done) { } }).execute(Boolean.class) .compose(RxLifecycle.with(this).<Boolean>bindToLifecycle()) .subscribeWith(new ProgressLoadingSubscriber<Boolean>(mIProgressLoader) { @OverRide public void onSuccess(Boolean aBoolean) { mIsEditSuccess = true; ToastUtils.toast("图片上传" + (aBoolean ? "成功" : "失败") + "!"); } });
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你好,我阅读了文档,网络请求生命周期和Activity/Fragment生命周期绑定,请问在XHTTP请求中如何使用RxJava的compose的操作符进行绑定?Xhttp请求中无法调用compose函数
The text was updated successfully, but these errors were encountered: