public static interface WebClient.ResponseSpec
Modifier and Type | Method and Description |
---|---|
<T> <any> |
bodyToFlux(java.lang.Class<T> elementType)
Extract the body to a
Flux . |
<T> <any> |
bodyToMono(java.lang.Class<T> bodyType)
Extract the body to a
Mono . |
<T> <any> |
toEntity(java.lang.Class<T> bodyType)
Returns the response as a delayed
ResponseEntity . |
<T> <any> |
toEntityList(java.lang.Class<T> elementType)
Returns the response as a delayed list of
ResponseEntity s. |
<T> <any> bodyToMono(java.lang.Class<T> bodyType)
Mono
. If the response has status code 4xx or 5xx, the
Mono
will contain a WebClientException
.T
- response body typebodyType
- the expected response body typeWebClientException
if the status code is
4xx or 5xx<T> <any> bodyToFlux(java.lang.Class<T> elementType)
Flux
. If the response has status code 4xx or 5xx, the
Flux
will contain a WebClientException
.T
- the type of elements in the responseelementType
- the type of element in the responseWebClientException
if the status code is
4xx or 5xx<T> <any> toEntity(java.lang.Class<T> bodyType)
ResponseEntity
. Unlike
bodyToMono(Class)
and bodyToFlux(Class)
, this method does not check
for a 4xx or 5xx status code before extracting the body.T
- response body typebodyType
- the expected response body typeMono
with the ResponseEntity
<T> <any> toEntityList(java.lang.Class<T> elementType)
ResponseEntity
s. Unlike
bodyToMono(Class)
and bodyToFlux(Class)
, this method does not check
for a 4xx or 5xx status code before extracting the body.T
- the type of elements in the listelementType
- the expected response body list element typeMono
with the list of ResponseEntity
s