logo
  • 教程列表
  • SO官方文檔
  • 改造和 RxJava
    • 設定 Retrofit 和 RxJava
    • 發出連續請求
    • 提出並行請求
  1. StackOverflow 文件
  2. rx-java 教程
  3. 改造和 RxJava
  4. 提出並行請求

提出並行請求

Created: November-22, 2018

你可以使用 zip 運算子並行生成請求並組合結果,例如:

Observable.zip(api.getRepo(repoId1), api.getRepo(repoId2), (repo1, repo2) ->
    {
        //here you can combine the results
    }).subscribe(/*do something with the result*/);
  • 發出連續請求

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明