4
我有一個網絡調用,返回Observable
,並且我有另一個網絡調用,它不是rx,取決於第一個Observable
,我需要以某種方式將其與Rx全部轉換。如何調用取決於rx網絡調用的非rx網絡調用
Observable<Response> responseObservable = apiclient.executeRequest(request);
執行我需要做的另一個HTTP調用不返回Observable
後:
responseObservable.map(response - > execute the no rx network call using the response.id)
noRxClient.getInformation(response.id, new Action1<Information>() {
@Override
public void call(Information information) {
//Need to return information with page response
}
});
我需要調用此方法來呈現響應,那麼後
renderResponse(response, information);
如何我可以將非rx呼叫連接到rx,然後使用RxJava調用渲染響應?
如果wrapRenderResponse不返回任何內容會發生什麼?它只是呈現迴應。如何修改該代碼? –