Package | Description |
---|---|
org.springframework.http.client |
Contains an abstraction over client-side HTTP.
|
org.springframework.http.client.support |
This package provides generic HTTP support classes,
to be used by higher-level classes like RestTemplate.
|
org.springframework.web.client |
Core package of the client-side web support.
|
Modifier and Type | Class and Description |
---|---|
class |
AbstractClientHttpResponse
Abstract base for
ClientHttpResponse . |
Modifier and Type | Method and Description |
---|---|
ClientHttpResponse |
ClientHttpRequest.execute()
Execute this request, resulting in a
ClientHttpResponse that can be read. |
ClientHttpResponse |
AbstractClientHttpRequest.execute() |
ClientHttpResponse |
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.
|
ClientHttpResponse |
ClientHttpRequestInterceptor.intercept(HttpRequest request,
byte[] body,
ClientHttpRequestExecution execution)
Intercept the given request, and return a response.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.util.concurrent.ListenableFuture<ClientHttpResponse> |
AsyncClientHttpRequest.executeAsync()
Deprecated.
Execute this request asynchronously, resulting in a Future handle.
|
org.springframework.util.concurrent.ListenableFuture<ClientHttpResponse> |
AsyncClientHttpRequestExecution.executeAsync(HttpRequest request,
byte[] body)
Deprecated.
Resume the request execution by invoking the next interceptor in the chain
or executing the request to the remote service.
|
org.springframework.util.concurrent.ListenableFuture<ClientHttpResponse> |
AsyncClientHttpRequestInterceptor.intercept(HttpRequest request,
byte[] body,
AsyncClientHttpRequestExecution execution)
Deprecated.
Intercept the given request, and return a response future.
|
Modifier and Type | Method and Description |
---|---|
ClientHttpResponse |
BasicAuthorizationInterceptor.intercept(HttpRequest request,
byte[] body,
ClientHttpRequestExecution execution)
Deprecated.
|
ClientHttpResponse |
BasicAuthenticationInterceptor.intercept(HttpRequest request,
byte[] body,
ClientHttpRequestExecution execution) |
Modifier and Type | Method and Description |
---|---|
T |
ResponseExtractor.extractData(ClientHttpResponse response)
Extract data from the given
ClientHttpResponse and return it. |
T |
HttpMessageConverterExtractor.extractData(ClientHttpResponse response) |
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 to
MediaType.APPLICATION_OCTET_STREAM . |
protected HttpStatus |
DefaultResponseErrorHandler.getHttpStatusCode(ClientHttpResponse response)
Deprecated.
as of 5.0, in favor of
DefaultResponseErrorHandler.handleError(ClientHttpResponse, HttpStatus) |
protected byte[] |
DefaultResponseErrorHandler.getResponseBody(ClientHttpResponse response)
Read the body of the given response (for inclusion in a status exception).
|
void |
DefaultResponseErrorHandler.handleError(ClientHttpResponse response)
Handle the error in the given response with the given resolved status code.
|
void |
ResponseErrorHandler.handleError(ClientHttpResponse response)
Handle the error in the given response.
|
void |
ExtractingResponseErrorHandler.handleError(ClientHttpResponse response,
HttpStatus statusCode) |
protected void |
DefaultResponseErrorHandler.handleError(ClientHttpResponse response,
HttpStatus statusCode)
Handle the error based on the resolved status code.
|
default void |
ResponseErrorHandler.handleError(URI url,
HttpMethod method,
ClientHttpResponse response)
Alternative to
ResponseErrorHandler.handleError(ClientHttpResponse) with extra
information providing access to the request URL and HTTP method. |
protected void |
RestTemplate.handleResponse(URI url,
HttpMethod method,
ClientHttpResponse response)
Handle the given response, performing appropriate logging and
invoking the
ResponseErrorHandler if necessary. |
boolean |
DefaultResponseErrorHandler.hasError(ClientHttpResponse response)
Delegates to
DefaultResponseErrorHandler.hasError(HttpStatus) (for a standard status enum value) or
DefaultResponseErrorHandler.hasError(int) (for an unknown status code) with the response status code. |
boolean |
ResponseErrorHandler.hasError(ClientHttpResponse response)
Indicate whether the given response has any errors.
|