Chaining dependent observables
问题 I need to create dependent API calls where the second one needs a value returned by the first one. First thing that comes to mind is using flatMap ApiManager.shared .createReport(report: report) .flatMap { (report) -> Observable<Report> in return ApiManager.shared.createReportStep(reportID: report.ID) } createReport returns Observable<Report> where after successfull call returns updated Report model(with ID), after that I need to call API to create report step, where report.ID is needed.