Top Description Fields Constructors Methods
org.springframework.web.reactive.function.client

pack-priv abstract Class WebClientUtils

extends Object
Class Inheritance
Imports
java.net.URI, .URISyntaxException, java.util.List, java.util.function.Predicate, org.reactivestreams.Publisher, reactor.core.publisher.Flux, .Mono, org.springframework.core.codec.CodecException, org.springframework.http.HttpMethod, .ResponseEntity, org.springframework.util.StringUtils

Internal methods shared between DefaultWebClient and DefaultClientResponse.
Author
Arjen Poutsma
Since
5.2

Field Summary

Modifier and TypeField and Description
private static final String
public static final Predicate<? super Throwable>
WRAP_EXCEPTION_PREDICATE

Predicate that returns true if an exception should be wrapped.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static String
getRequestDescription(HttpMethod httpMethod, URI uri)

Return a String representation of the request details for logging purposes.

public static <T> Mono<ResponseEntity<T>>
mapToEntity(ClientResponse response, Mono<T> bodyMono)

Map the given response to a single value ResponseEntity<T>.

public static <T> Mono<ResponseEntity<List<T>>>
mapToEntityList(ClientResponse response, Publisher<T> body)

Map the given response to a ResponseEntity<List<T>>.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

VALUE_NONEback to summary
private static final String VALUE_NONE
WRAP_EXCEPTION_PREDICATEback to summary
public static final Predicate<? super Throwable> WRAP_EXCEPTION_PREDICATE

Predicate that returns true if an exception should be wrapped.

Constructor Detail

WebClientUtilsback to summary
pack-priv WebClientUtils()

Method Detail

getRequestDescriptionback to summary
public static String getRequestDescription(HttpMethod httpMethod, URI uri)

Return a String representation of the request details for logging purposes.

Since
6.0.16
mapToEntityback to summary
public static <T> Mono<ResponseEntity<T>> mapToEntity(ClientResponse response, Mono<T> bodyMono)

Map the given response to a single value ResponseEntity<T>.

Annotations
@SuppressWarnings:unchecked
mapToEntityListback to summary
public static <T> Mono<ResponseEntity<List<T>>> mapToEntityList(ClientResponse response, Publisher<T> body)

Map the given response to a ResponseEntity<List<T>>.