Package org.springframework.web.client
@NonNullApi
@NonNullFields
package org.springframework.web.client
Core package of the client-side web support.
Provides the RestTemplate and RestClient.
-
ClassDescriptionSpring's default implementation of the
ResponseErrorHandler
interface.Implementation ofResponseErrorHandler
that usesHttpMessageConverters
to convert HTTP error responses toRestClientExceptions
.Exception thrown when an HTTP 4xx is received.HttpClientErrorException
for status HTTP 400 Bad Request.HttpClientErrorException
for status HTTP 409 Conflict.HttpClientErrorException
for status HTTP 403 Forbidden.HttpClientErrorException
for status HTTP 410 Gone.HttpClientErrorException
for status HTTP 405 Method Not Allowed.HttpClientErrorException
for status HTTP 406 Not Acceptable.HttpClientErrorException
for status HTTP 404 Not Found.HttpClientErrorException
for status HTTP 429 Too Many Requests.HttpClientErrorException
for status HTTP 401 Unauthorized.HttpClientErrorException
for status HTTP 422 Unprocessable Entity.HttpClientErrorException
for status HTTP 415 Unsupported Media Type.Response extractor that uses the given entity converters to convert the response into a typeT
.Exception thrown when an HTTP 5xx is received.HttpServerErrorException
for HTTP status 502 Bad Gateway.HttpServerErrorException
for status HTTP 504 Gateway Timeout.HttpServerErrorException
for status HTTP 500 Internal Server Error.HttpServerErrorException
for status HTTP 501 Not Implemented.HttpServerErrorException
for status HTTP 503 Service Unavailable.Abstract base class for exceptions based on anHttpStatusCode
.A basic, no operationResponseErrorHandler
implementation suitable for ignoring any error.Callback interface for code that operates on aClientHttpRequest
.Exception thrown when an I/O error occurs.Strategy interface used by theRestTemplate
to determine whether a particular response has an error or not.Generic callback interface used byRestTemplate
's retrieval methods.Client to perform HTTP requests, exposing a fluent, synchronous API over underlying HTTP client libraries such as the JDKHttpClient
, Apache HttpComponents, and others.A mutable builder for creating aRestClient
.Contract for specifying request headers and body leading up to the exchange.Contract for specifying request headers, body and URI for a request.RestClient.RequestHeadersSpec<S extends RestClient.RequestHeadersSpec<S>>Contract for specifying request headers leading up to the exchange.Extension ofClientHttpResponse
that can convert the body.Defines the contract forRestClient.RequestHeadersSpec.exchange(ExchangeFunction)
.Contract for specifying request headers and URI for a request.Contract for specifying response operations following the exchange.RestClient.UriSpec<S extends RestClient.RequestHeadersSpec<?>>Contract for specifying the URI for a request.Base class for exceptions thrown byRestTemplate
in case a request fails because of a server error response, as determined viaResponseErrorHandler.hasError(ClientHttpResponse)
, failure to decode the response, or a low level I/O error.Common base class for exceptions that contain actual HTTP response data.Interface specifying a basic set of RESTful operations.Synchronous client to perform HTTP requests, exposing a simple, template method API over underlying HTTP client libraries such as the JDKHttpURLConnection
, Apache HttpComponents, and others.Raised when no suitableHttpMessageConverter
could be found to extract the response.Exception thrown when an unknown (or custom) HTTP status code is received.