spring-framework / org.springframework.web.reactive.function.client / awaitExchange

awaitExchange

suspend fun RequestHeadersSpec<out RequestHeadersSpec<*>>.awaitExchange(): ClientResponse
Deprecated: Deprecated since 5.3 due to the possibility to leak memory and/or connections; please,use awaitExchange { } or exchangeToFlow { } instead; consider also using retrieve()which provides access to the response status and headers via ResponseEntity along with error status handling.

Coroutines variant of WebClient.RequestHeadersSpec.exchange.

Author
Sebastien Deleuze

Since
5.2

suspend fun <T : Any> RequestHeadersSpec<out RequestHeadersSpec<*>>.awaitExchange(responseHandler: suspend (ClientResponse) -> T): T

Coroutines variant of WebClient.RequestHeadersSpec.exchangeToMono.

Author
Sebastien Deleuze

Since
5.3