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

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

Types

ClientRequest

interface ClientRequest

Represents a typed, immutable, client-side HTTP request, as executed by the ExchangeFunction. Instances of this interface can be created via static builder methods.

Note that applications are more likely to perform requests through WebClient rather than using this directly.

ExchangeFilterFunctions

abstract class ExchangeFilterFunctions

Implementations of ExchangeFilterFunction that provide various useful request filter operations, such as basic authentication, error handling, etc.

ExchangeFunctions

abstract class ExchangeFunctions

Exposes request-response exchange functionality, such as to create an ExchangeFunction given a ClientHttpConnector.

Exceptions

WebClientResponseException

open class WebClientResponseException : WebClientException

Exceptions that contain actual HTTP response data.

Functions

body

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

Extension for WebClient.RequestBodySpec.body providing a body<Foo>() variant leveraging Kotlin reified type parameters.

bodyToFlux

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

Extension for ClientResponse.bodyToFlux providing a bodyToFlux<Foo>() variant leveraging Kotlin reified type parameters.

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

Extension for WebClient.ResponseSpec.bodyToFlux providing a bodyToFlux<Foo>() variant leveraging Kotlin reified type parameters.

bodyToMono

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

Extension for ClientResponse.bodyToMono providing a bodyToMono<Foo>() variant leveraging Kotlin reified type parameters.

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

Extension for WebClient.ResponseSpec.bodyToMono providing a bodyToMono<Foo>() variant leveraging Kotlin reified type parameters.

toEntity

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

Extension for ClientResponse.toEntity providing a toEntity<Foo>() variant leveraging Kotlin reified type parameters.

toEntityList

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

Extension for ClientResponse.toEntityList providing a bodyToEntityList<Foo>() variant leveraging Kotlin reified type parameters.