spring-framework / org.springframework.web.reactive.function.server / awaitBodyOrNull

awaitBodyOrNull

suspend fun <reified T : Any> ServerRequest.awaitBodyOrNull(): T?

Nullable Coroutines variant of ServerRequest.bodyToMono.

Author
Sebastien Deleuze

Since
5.2

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

KClass nullable Coroutines variant of ServerRequest.bodyToMono. Please consider awaitBodyOrNull<Foo> variant if possible.

Author
Igor Manushin

Since
5.3