spring-framework
5.3.39

# KotlinBodySpec

interface KotlinBodySpec<B>
Content copied to clipboard

Kotlin compliant `WebTestClient.BodySpec` for expectations on the response body decoded to a single Object, see KT-5464 for more details.

#### Since

5.0.6

## Functions

consumeWith
Link copied to clipboard
abstract fun consumeWith(consumer: (EntityExchangeResult<B>) -> Unit): KotlinBodySpec<B>
Content copied to clipboard

Assert the exchange result with the given consumer.

isEqualTo
Link copied to clipboard
abstract fun isEqualTo(expected: B): KotlinBodySpec<B>
Content copied to clipboard

Assert the extracted body is equal to the given value.

returnResult
Link copied to clipboard
abstract fun returnResult(): EntityExchangeResult<B>
Content copied to clipboard

Exit the chained API and return an `ExchangeResult` with the decoded response content.