awaitBody

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

Non-nullable Coroutines variant of ServerRequest.bodyToMono.

Author

Sebastien Deleuze

Since

5.2

Throws

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

if the underlying Mono does not emit any value