title: Data transfer between requests using Retrofit +RxJava
body: <p>I decided to use <strong>Retrofit 2.0</strong> + <strong>RxJava</strong> in my project.
  The main problem is that I not fully understand how should it be.</p>
  
  <p>For first all requests are to my server  API, and every request must have accessToken.</p>
  
  <p>For example I want get all books using my API:</p>
  
  <p>1.Send request to get AccessToken request</p>
  
  <p>2.Get reply with AccessToken value </p>
  
  <p>3.Insert this value to getBookRequest</p>
  
  <p>4.Send getBookRequest and then get reply with JSONArray of books</p>
  
  <p>Question is how should I make this? </p>
  
  <p>Now i have only method with getting <strong>accessTokenValue:</strong></p>
  
  <pre><code>public void accessToken() {
      ApiMethods methods = ApiFactory.connect();
      methods.getAccess(MAIN_URL + ACCESS_URL)
              .timeout(15, TimeUnit.SECONDS)
              .retry(3)
              .subscribeOn(Schedulers.newThread())
              .map(new Func1&lt;List&lt;GetAccess&gt;, AccessToken&gt;() {
                  @NonNull
                  @Override
                  public AccessToken call(List&lt;GetAccess&gt; getAccesses) {
                      double xA = (double) getAccesses.get(0).A;
                      double xB = (double) getAccesses.get(0).B;
                      double xC = (double) getAccesses.get(0).C;
                      passDouble = //...SOME MANIPULATING WITH VALUES...//
                      id = getAccesses.get(0).ID;
                      AccessToken token = new AccessToken();
                      token.setId(String.valueOf(id));
                      token.setToken(String.valueOf(passDouble));
                      token.setIsCompleted(true);
  
  
                      return token;
                  }
              })
              .onErrorReturn(new Func1&lt;Throwable, AccessToken&gt;() {
                  @Override
                  public AccessToken call(Throwable throwable) {
                      return new AccessToken(String.valueOf(id), String.valueOf(passDouble), false);
                  }
              })
              .observeOn(AndroidSchedulers.mainThread())
              .subscribe(new Action1&lt;AccessToken&gt;() {
                  @Override
                  public void call(AccessToken accessToken) {
                      //EventBus.getDefault().post(accessToken);
                  }
              });
  }
  </code></pre>
  
  <p>Should i use <strong>Observable.zip</strong>  or something else? What is the better way to implement second request to my server with values from first request?</p>