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

Functions

Link copied to clipboard
suspend fun ClientResponse.awaitBodilessEntity(): ResponseEntity<Void>

Coroutines variant of ClientResponse.toBodilessEntity.

suspend fun WebClient.ResponseSpec.awaitBodilessEntity(): ResponseEntity<Void>
Link copied to clipboard
inline suspend fun <T : Any> ClientResponse.awaitBody(): T

Non-nullable Coroutines variant of ClientResponse.bodyToMono.

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

Coroutines variant of WebClient.ResponseSpec.bodyToMono.

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

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

Link copied to clipboard
inline suspend fun <T : Any> ClientResponse.awaitBodyOrNull(): T?

Nullable coroutines variant of ClientResponse.bodyToMono.

inline suspend fun <T : Any> WebClient.ResponseSpec.awaitBodyOrNull(): T?

Coroutines variant of WebClient.ResponseSpec.bodyToMono.

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

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

Link copied to clipboard
inline suspend fun <T : Any> ClientResponse.awaitEntity(): ResponseEntity<T>

Coroutines variant of ClientResponse.toEntity.

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

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

Link copied to clipboard
inline suspend fun <T : Any> ClientResponse.awaitEntityList(): ResponseEntity<List<T>>

Coroutines variant of ClientResponse.toEntityList.

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

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

Link copied to clipboard
suspend fun <T : Any> WebClient.RequestHeadersSpec<out WebClient.RequestHeadersSpec<*>>.awaitExchange(responseHandler: suspend (ClientResponse) -> T): T
Link copied to clipboard
suspend fun <T : Any> WebClient.RequestHeadersSpec<out WebClient.RequestHeadersSpec<*>>.awaitExchangeOrNull(responseHandler: suspend (ClientResponse) -> T?): T?

Variant of WebClient.RequestHeadersSpec.awaitExchange that allows a nullable return

Link copied to clipboard
inline fun <T : Any, S : Publisher<T>> WebClient.RequestBodySpec.body(publisher: S): WebClient.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.

inline fun <T : Any> WebClient.RequestBodySpec.body(producer: Any): WebClient.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.

inline fun <T : Any> WebClient.RequestBodySpec.body(flow: Flow<T>): WebClient.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.

Link copied to clipboard
inline fun <T : Any> ClientResponse.bodyToFlow(): Flow<T>
inline fun <T : Any> WebClient.ResponseSpec.bodyToFlow(): Flow<T>
fun <T : Any> ClientResponse.bodyToFlow(clazz: KClass<T>): Flow<T>

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

Link copied to clipboard
inline 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.

inline fun <T : Any> WebClient.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.

Link copied to clipboard
inline 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.

inline fun <T : Any> WebClient.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.

Link copied to clipboard
suspend fun ClientResponse.createExceptionAndAwait(): WebClientResponseException

Coroutines variant of ClientResponse.createException.

Link copied to clipboard
fun <T : Any> WebClient.RequestHeadersSpec<out WebClient.RequestHeadersSpec<*>>.exchangeToFlow(responseHandler: (ClientResponse) -> Flow<T>): Flow<T>
Link copied to clipboard
inline 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.

inline fun <T : Any> WebClient.ResponseSpec.toEntity(): Mono<ResponseEntity<T>>

Extension for WebClient.ResponseSpec.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.

Link copied to clipboard
inline fun <T : Any> WebClient.ResponseSpec.toEntityFlux(): Mono<ResponseEntity<Flux<T>>>

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

Link copied to clipboard
inline 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.

inline fun <T : Any> WebClient.ResponseSpec.toEntityList(): Mono<ResponseEntity<List<T>>>

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