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

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

Functions

awaitBodilessEntity

Coroutines variant of ClientResponse.toBodilessEntity.

suspend fun ClientResponse.awaitBodilessEntity(): ResponseEntity<Void>

awaitBody

Non-nullable Coroutines variant of ClientResponse.bodyToMono.

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

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

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

Coroutines variant of WebClient.ResponseSpec.bodyToMono.

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

awaitBodyOrNull

Nullable coroutines variant of ClientResponse.bodyToMono.

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

KClass nullable coroutines variant of ClientResponse.bodyToMono. Please consider awaitBodyOrNull<Foo> variant if possible.

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

awaitEntity

Coroutines variant of ClientResponse.toEntity.

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

KClass coroutines variant of ClientResponse.toEntity. Please consider awaitEntity<Foo> variant if possible.

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

awaitEntityList

Coroutines variant of ClientResponse.toEntityList.

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

KClass coroutines variant of ClientResponse.toEntityList. Please consider awaitEntityList<Foo> variant if possible.

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

awaitExchange

Coroutines variant of WebClient.RequestHeadersSpec.exchange.

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

Coroutines variant of WebClient.RequestHeadersSpec.exchangeToMono.

suspend fun <T : Any> RequestHeadersSpec<out RequestHeadersSpec<*>>.awaitExchange(responseHandler: suspend (ClientResponse) -> T): T

body

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, S : Publisher<T>> RequestBodySpec.body(publisher: S): RequestHeadersSpec<*>

Extension for WebClient.RequestBodySpec.body providing a body(Flow<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(flow: Flow<T>): RequestHeadersSpec<*>

Extension for WebClient.RequestBodySpec.body providing a body<T>(Any) 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(producer: Any): RequestHeadersSpec<*>

bodyToFlow

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

fun <T : Any> ClientResponse.bodyToFlow(): Flow<T>

KClass coroutines kotlinx.coroutines.flow.Flow based variant of ClientResponse.bodyToFlux. Please consider bodyToFlow<Foo> variant if possible.

fun <T : Any> ClientResponse.bodyToFlow(clazz: KClass<T>): Flow<T>

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

fun <T : Any> ResponseSpec.bodyToFlow(): Flow<T>

bodyToFlux

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> ClientResponse.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.

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

bodyToMono

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> ClientResponse.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.

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

createExceptionAndAwait

Coroutines variant of ClientResponse.createException.

suspend fun ClientResponse.createExceptionAndAwait(): WebClientResponseException

exchangeToFlow

Coroutines variant of WebClient.RequestHeadersSpec.exchangeToFlux.

fun <T : Any> RequestHeadersSpec<out RequestHeadersSpec<*>>.exchangeToFlow(responseHandler: (ClientResponse) -> Flow<T>): Flow<T>

toEntity

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.

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

toEntityList

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.

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