open static fun <T : Any> toMono(elementClass: Class<out T>): BodyExtractor<Mono<T>, ReactiveHttpInputMessage>
Return a BodyExtractor that reads into a Reactor Mono.
elementClass - the class of element in the Mono
Return
a BodyExtractor that reads a mono
open static fun <T : Any> toMono(typeReference: ParameterizedTypeReference<T>): BodyExtractor<Mono<T>, ReactiveHttpInputMessage>
Return a BodyExtractor that reads into a Reactor Mono. The given ParameterizedTypeReference is used to pass generic type information, for instance when using the org.springframework.web.reactive.function.client.WebClient
Mono<Map<String, String>> body = this.webClient .get() .uri("http://example.com") .exchange() .flatMap(r -> r.body(toMono(new ParameterizedTypeReference<Map<String,String>>() {})));
typeReference - a reference to the type of element in the Mono
Return
a BodyExtractor that reads a mono