Answer the question
In order to leave comments, you need to log in
How to make multiple HTTP requests in Android?
Friends, hello everyone.
Tell me how to do it right. I have a Dto class that is filled with data from several URLs, after which a callback is called and this Dto gets into it.
Something like:
service.request(new Callback() {
public void success(User user) {
// ....
}
}
});
Answer the question
In order to leave comments, you need to log in
Use retrofit+rxjava, combine the results of three queries.
Or use kotlin and coroutines, make three requests, wait for them and construct the object.
Or block the builder and wait for the results of three requests in callbacks.
Asynctask is not needed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question