awaitBody

inline suspend fun <T : Any> ServerRequest.awaitBody(): T

Non-nullable Coroutines variant of ServerRequest.bodyToMono.

Author

Sebastien Deleuze

Since

5.2

Throws

NoSuchElementException

if the underlying Mono does not emit any value


suspend fun <T : Any> ServerRequest.awaitBody(clazz: KClass<T>): T

KClass non-nullable Coroutines variant of ServerRequest.bodyToMono. Please consider awaitBody<Foo> variant if possible.

Author

Igor Manushin

Since

5.3

Throws

NoSuchElementException

if the underlying Mono does not emit any value