awaitExchange

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

Coroutines variant of WebClient.RequestHeadersSpec.exchangeToMono.

Author

Sebastien Deleuze

Since

5.3


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