ClientResponse.
| Modifier and Type | Class and Description |
|---|---|
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final BodyExtractor. | |
| private static final byte[] | |
| private final ClientResponse. | |
| private final String | |
| private final String | |
| private final Supplier | |
| private final ClientHttpResponse | |
| private final ExchangeStrategies |
| Access | Constructor and Description |
|---|---|
| public | DefaultClientResponse(ClientHttpResponse response, ExchangeStrategies strategies, String logPrefix, String requestDescription, Supplier<HttpRequest> requestSupplier)
|
| Modifier and Type | Method and Description |
|---|---|
| public <T> T | body(BodyExtractor<T, ? super ClientHttpResponse>
the extractor)BodyExtractor that reads from the responseImplements org. Extract the body with the given |
| public <T> Flux | bodyToFlux(Class<? extends T>
the class of elements in the elementClass)FluxImplements org. Extract the body to a |
| public <T> Flux | bodyToFlux(ParameterizedTypeReference<T>
the type reference of elements in the elementTypeRef)FluxImplements org. Extract the body to a |
| public <T> Mono | bodyToMono(Class<? extends T>
the class of element in the elementClass)MonoImplements org. Extract the body to a |
| public <T> Mono | bodyToMono(ParameterizedTypeReference<T>
the type reference of element in the elementTypeRef)MonoImplements org. Extract the body to a |
| public MultiValueMap | cookies()
Implements org. Return the cookies of this response. |
| public <T> Mono | createError()
Implements org. Create a |
| public Mono | createException()
Implements org. Create a |
| public ClientResponse. | headers()
Implements org. Return the headers of this response. |
| private Function | |
| public String | logPrefix()
Implements org. Return a log message prefix to use to correlate messages for this exchange. |
| public Mono | releaseBody()
Implements org. Release the body of this response. |
| public HttpRequest | request()
Implements org. Return the request associated with the response. |
| public HttpStatusCode | statusCode()
Implements org. Return the HTTP status code as an |
| public ExchangeStrategies | strategies()
Implements org. Return the strategies used to convert the body of this response. |
| public Mono | toBodilessEntity()
Implements org. Return this response as a delayed |
| public <T> Mono | toEntity(Class<T>
the expected response body type bodyType)Implements org. Return this response as a delayed |
| public <T> Mono | toEntity(ParameterizedTypeReference<T>
a type reference describing the expected response body type bodyTypeReference)Implements org. Return this response as a delayed |
| public <T> Mono | toEntityList(Class<T>
the expected response body list element class elementClass)Implements org. Return this response as a delayed list of |
| public <T> Mono | toEntityList(ParameterizedTypeReference<T>
the expected response body list element reference type elementTypeRef)Implements org. Return this response as a delayed list of |
| bodyExtractorContext | back to summary |
|---|---|
| private final BodyExtractor. | |
| EMPTY | back to summary |
|---|---|
| private static final byte[] EMPTY | |
| headers | back to summary |
|---|---|
| private final ClientResponse. | |
| logPrefix | back to summary |
|---|---|
| private final String logPrefix | |
| requestDescription | back to summary |
|---|---|
| private final String requestDescription | |
| requestSupplier | back to summary |
|---|---|
| private final Supplier<HttpRequest> requestSupplier | |
| response | back to summary |
|---|---|
| private final ClientHttpResponse response | |
| strategies | back to summary |
|---|---|
| private final ExchangeStrategies strategies | |
| DefaultClientResponse | back to summary |
|---|---|
| public DefaultClientResponse(ClientHttpResponse response, ExchangeStrategies strategies, String logPrefix, String requestDescription, Supplier<HttpRequest> requestSupplier) | |
| body | back to summary |
|---|---|
| public <T> T body(BodyExtractor<T, ? super ClientHttpResponse> extractor) Implements org. Doc from org. Extract the body with the given
| |
| bodyToFlux | back to summary |
|---|---|
| public <T> Flux Implements org. Doc from org. Extract the body to a
| |
| bodyToFlux | back to summary |
|---|---|
| public <T> Flux Implements org. Doc from org. Extract the body to a
| |
| bodyToMono | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Extract the body to a | |
| bodyToMono | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Extract the body to a
| |
| cookies | back to summary |
|---|---|
| public MultiValueMap Implements org. Doc from org. Return the cookies of this response.
| |
| createError | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Create a
| |
| createException | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Create a
| |
| headers | back to summary |
|---|---|
| public ClientResponse. Implements org. Doc from org. Return the headers of this response.
| |
| initDecodeFunction | back to summary |
|---|---|
| private Function | |
| logPrefix | back to summary |
|---|---|
| public String logPrefix() Implements org. Doc from org. Return a log message prefix to use to correlate messages for this exchange. The prefix is based on ClientRequest#logPrefix(), which
itself is based on the value of the
| |
| releaseBody | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Release the body of this response. | |
| request | back to summary |
|---|---|
| public HttpRequest request() Implements org. Doc from org. Return the request associated with the response.
| |
| statusCode | back to summary |
|---|---|
| public HttpStatusCode statusCode() Implements org. Doc from org. Return the HTTP status code as an
| |
| strategies | back to summary |
|---|---|
| public ExchangeStrategies strategies() Implements org. Doc from org. Return the strategies used to convert the body of this response.
| |
| toBodilessEntity | back to summary |
|---|---|
| public Mono Implements org. Doc from org. Return this response as a delayed
| |
| toEntity | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Return this response as a delayed
| |
| toEntity | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Return this response as a delayed
| |
| toEntityList | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Return this response as a delayed list of
| |
| toEntityList | back to summary |
|---|---|
| public <T> Mono Implements org. Doc from org. Return this response as a delayed list of
| |
| Modifier and Type | Field and Description |
|---|---|
| private final HttpHeaders |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public HttpHeaders | asHttpHeaders()
Implements org. Return the headers as an |
| public OptionalLong | contentLength()
Implements org. Return the length of the body in bytes, as specified by the
|
| public Optional | contentType()
Implements org. Return the media type of the body, as specified
by the |
| public List | header(String
the header name headerName)Implements org. Return the header value(s), if any, for the header of the given name. |
| private OptionalLong |
| httpHeaders | back to summary |
|---|---|
| private final HttpHeaders httpHeaders | |
| DefaultHeaders | back to summary |
|---|---|
| private DefaultHeaders() | |
| asHttpHeaders | back to summary |
|---|---|
| public HttpHeaders asHttpHeaders() Implements org. Doc from org. Return the headers as an
| |
| contentLength | back to summary |
|---|---|
| public OptionalLong contentLength() Implements org. Doc from org. Return the length of the body in bytes, as specified by the
| |
| contentType | back to summary |
|---|---|
| public Optional Implements org. Doc from org. Return the media type of the body, as specified
by the
| |
| header | back to summary |
|---|---|
| public List Implements org. Doc from org. Return the header value(s), if any, for the header of the given name. Return an empty list if no header values are found. | |
| toOptionalLong | back to summary |
|---|---|
| private OptionalLong toOptionalLong(long value) | |