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不返回任何内容会发生什么?它只是呈现回应。如何修改该代码? –