Uses of Interface
org.springframework.http.client.ClientHttpResponse
Package
Description
Contains an abstraction over client-side HTTP.
This package provides generic HTTP support classes,
to be used by higher-level classes like RestTemplate.
Mock implementations of client-side HTTP abstractions.
Contains client-side REST testing support.
Contains built-in
ResponseCreator
implementations.Core package of the client-side web support.
-
Uses of ClientHttpResponse in org.springframework.http.client
Modifier and TypeClassDescriptionclass
Deprecated, for removal: This API element is subject to removal in a future version.as of 6.0, with no direct replacement; scheduled for removal in 6.2Modifier and TypeMethodDescriptionfinal ClientHttpResponse
AbstractClientHttpRequest.execute()
ClientHttpRequest.execute()
Execute this request, resulting in aClientHttpResponse
that can be read.ClientHttpRequestExecution.execute
(HttpRequest request, byte[] body) Execute the request with the given request attributes and body, and return the response.protected abstract ClientHttpResponse
AbstractClientHttpRequest.executeInternal
(HttpHeaders headers) Abstract template method that writes the given headers and content to the HTTP request.ClientHttpRequestInterceptor.intercept
(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) Intercept the given request, and return a response. -
Uses of ClientHttpResponse in org.springframework.http.client.support
Modifier and TypeMethodDescriptionBasicAuthenticationInterceptor.intercept
(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) -
Uses of ClientHttpResponse in org.springframework.mock.http.client
Modifier and TypeMethodDescriptionfinal ClientHttpResponse
MockClientHttpRequest.execute()
protected ClientHttpResponse
MockClientHttpRequest.executeInternal()
The default implementation returns the configuredresponse
.Modifier and TypeMethodDescriptionvoid
MockClientHttpRequest.setResponse
(ClientHttpResponse clientHttpResponse) Set theClientHttpResponse
to be used as the result of executing the this request. -
Uses of ClientHttpResponse in org.springframework.test.web.client
Modifier and TypeMethodDescriptionDefaultRequestExpectation.createResponse
(ClientHttpRequest request) Note that as of 5.0.3, the creation of the response, which may block intentionally, is separated from request count tracking, and this method no longer increments the count transparently.ResponseCreator.createResponse
(ClientHttpRequest request) Create a response for the given request.AbstractRequestExpectationManager.validateRequest
(ClientHttpRequest request) RequestExpectationManager.validateRequest
(ClientHttpRequest request) Validate the given actual request against the declared expectations. -
Uses of ClientHttpResponse in org.springframework.test.web.client.response
Modifier and TypeMethodDescriptionDefaultResponseCreator.createResponse
(ClientHttpRequest request) ExecutingResponseCreator.createResponse
(ClientHttpRequest request) -
Uses of ClientHttpResponse in org.springframework.web.client
Modifier and TypeInterfaceDescriptionstatic interface
Extension ofClientHttpResponse
that can convert the body.Modifier and TypeMethodDescriptionHttpMessageConverterExtractor.extractData
(ClientHttpResponse response) ResponseExtractor.extractData
(ClientHttpResponse response) Extract data from the givenClientHttpResponse
and return it.protected Charset
DefaultResponseErrorHandler.getCharset
(ClientHttpResponse response) Determine the charset of the response (for inclusion in a status exception).protected MediaType
HttpMessageConverterExtractor.getContentType
(ClientHttpResponse response) Determine the Content-Type of the response based on the "Content-Type" header or otherwise default toMediaType.APPLICATION_OCTET_STREAM
.protected byte[]
DefaultResponseErrorHandler.getResponseBody
(ClientHttpResponse response) Read the body of the given response (for inclusion in a status exception).void
RestClient.ResponseSpec.ErrorHandler.handle
(HttpRequest request, ClientHttpResponse response) Handle the error in the given response.void
DefaultResponseErrorHandler.handleError
(ClientHttpResponse response) Handle the error in the given response with the given resolved status code.protected void
DefaultResponseErrorHandler.handleError
(ClientHttpResponse response, HttpStatusCode statusCode) Handle the error based on the resolved status code.void
ExtractingResponseErrorHandler.handleError
(ClientHttpResponse response, HttpStatusCode statusCode) default void
ResponseErrorHandler.handleError
(URI url, HttpMethod method, ClientHttpResponse response) Alternative toResponseErrorHandler.handleError(ClientHttpResponse)
with extra information providing access to the request URL and HTTP method.void
ResponseErrorHandler.handleError
(ClientHttpResponse response) Handle the error in the given response.protected void
RestTemplate.handleResponse
(URI url, HttpMethod method, ClientHttpResponse response) Handle the given response, performing appropriate logging and invoking theResponseErrorHandler
if necessary.boolean
DefaultResponseErrorHandler.hasError
(ClientHttpResponse response) Delegates toDefaultResponseErrorHandler.hasError(HttpStatusCode)
with the response status code.boolean
ResponseErrorHandler.hasError
(ClientHttpResponse response) Indicate whether the given response has any errors.protected Function<ResolvableType,
?> DefaultResponseErrorHandler.initBodyConvertFunction
(ClientHttpResponse response, byte[] body) Return a function for decoding the error content.