How to extract content of Mono and set to a variable in Kotlin?
I have a function foo() that return Mono I want to store the String output in a variable
e.g. -
fun foo(): Mono {
return Mono.just("Hello")
}
fun consumeFoo() : String {
val result : String = // Set this variable to "Hello" by calling foo()
}
In this case how to set result to string inside Mono ?
Note - I want to achieve this in a non-blocking way