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

  • 关于我们
  • 免责声明