Hi guys, some context to the question. I have a Client class that is doing a blocking request to some external API. I'm using RestClient in my project. Due to constraints, I'd like to stay with RestClient for this task, I know that WebClient would be a good fit for this situation but I'd like to get to know if there is a good solution to that problem with RestClient.
This is the code snippet in which I'd like to insert .parallel()
public List<GithubRepoResponseDto> getUserReposWithoutForks(String user) {
List<GithubRepo> allRepos = githubClient.getUserRepos(user);
List<GithubRepoResponseDto> result = allRepos.stream()
.filter(repo -> !repo.fork())
.parallel()
.map(this::mapToRepoResponse)
.toList();
return result;
method "mapToRepoResponse" is making another external request to pull missing data that is accessible only after the first request.