java - Call void method and pass trought arguments RxJava -
i'm looking better :
mrestservice.login(email, password) // login user in .flatmap(user -> observable.zip( mrestservice.start(user._token), // start session observable.just(user), (v, u) -> (user) u // pass user throught )) .subscribe(user -> { }, throwable -> { });
but coudn't come better.
the start
method on mrestservice
perform side effect. can use doonnext
method here sort of side effect.
mrerstservice.login(email, password) .doonnext(u -> mrestservice.start(user._token)) .subscribe();
Comments
Post a Comment