Medium WebClient & WebFlux
Chain Reactive Calls
Simulate two chained WebClient calls. First, fetch a user ID from getActiveUserId() which returns Mono<Int> with value 42. Then, use flatMap to fetch user details from getUserDetails(id) which returns Mono<String> with "User #42 - Active". Print the final result.
This pattern is fundamental for composing multiple async HTTP calls.
Expected
User #42 - Active
Main.kt