spring-framework / org.springframework.web.reactive.function.client

Package org.springframework.web.reactive.function.client

Functions

awaitBody

suspend fun <T : Any> ClientResponse.awaitBody(): T

Non-nullable Coroutines variant of ClientResponse.bodyToMono.

suspend fun <T : Any> ResponseSpec.awaitBody(): T

Coroutines variant of WebClient.ResponseSpec.bodyToMono.

awaitBodyOrNull

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

Nullable coroutines variant of ClientResponse.bodyToMono.

awaitEntity

suspend fun <T : Any> ClientResponse.awaitEntity(): ResponseEntity<T>

Coroutines variant of ClientResponse.toEntity.

awaitEntityList

suspend fun <T : Any> ClientResponse.awaitEntityList(): ResponseEntity<List<T>>

Coroutines variant of ClientResponse.toEntityList.

awaitExchange

suspend fun RequestHeadersSpec<out RequestHeadersSpec<*>>.awaitExchange(): ClientResponse

Coroutines variant of WebClient.RequestHeadersSpec.exchange.

body

fun <T : Any, S : Publisher<T>> RequestBodySpec.body(publisher: S): RequestHeadersSpec<*>

Extension for WebClient.RequestBodySpec.body providing a body(Publisher<T>) variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

fun <T : Any> RequestBodySpec.body(supplier: suspend () -> T): RequestHeadersSpec<*>

Coroutines variant of WebClient.RequestBodySpec.body.

bodyToFlow

fun <T : Any> ClientResponse.bodyToFlow(batchSize: Int = 1): Flow<T>

Coroutines kotlinx.coroutines.flow.Flow based variant of ClientResponse.bodyToFlux.

fun <T : Any> ResponseSpec.bodyToFlow(batchSize: Int = 1): Flow<T>

Coroutines kotlinx.coroutines.flow.Flow based variant of WebClient.ResponseSpec.bodyToFlux.

bodyToFlux

fun <T : Any> ClientResponse.bodyToFlux(): Flux<T>

Extension for ClientResponse.bodyToFlux providing a bodyToFlux<Foo>() variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

fun <T : Any> ResponseSpec.bodyToFlux(): Flux<T>

Extension for WebClient.ResponseSpec.bodyToFlux providing a bodyToFlux<Foo>() variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

bodyToMono

fun <T : Any> ClientResponse.bodyToMono(): Mono<T>

Extension for ClientResponse.bodyToMono providing a bodyToMono<Foo>() variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

fun <T : Any> ResponseSpec.bodyToMono(): Mono<T>

Extension for WebClient.ResponseSpec.bodyToMono providing a bodyToMono<Foo>() variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

toEntity

fun <T : Any> ClientResponse.toEntity(): Mono<ResponseEntity<T>>

Extension for ClientResponse.toEntity providing a toEntity<Foo>() variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.

toEntityList

fun <T : Any> ClientResponse.toEntityList(): Mono<ResponseEntity<List<T>>>

Extension for ClientResponse.toEntityList providing a bodyToEntityList<Foo>() variant leveraging Kotlin reified type parameters. This extension is not subject to type erasure and retains actual generic type arguments.