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
ResponseErrorHandlerinterface.Implementation ofResponseErrorHandlerthat usesHttpMessageConvertersto convert HTTP error responses toRestClientExceptions.Exception thrown when an HTTP 4xx is received.HttpClientErrorExceptionfor status HTTP 400 Bad Request.HttpClientErrorExceptionfor status HTTP 409 Conflict.HttpClientErrorExceptionfor status HTTP 403 Forbidden.HttpClientErrorExceptionfor status HTTP 410 Gone.HttpClientErrorExceptionfor status HTTP 405 Method Not Allowed.HttpClientErrorExceptionfor status HTTP 406 Not Acceptable.HttpClientErrorExceptionfor status HTTP 404 Not Found.HttpClientErrorExceptionfor status HTTP 429 Too Many Requests.HttpClientErrorExceptionfor status HTTP 401 Unauthorized.HttpClientErrorExceptionfor status HTTP 422 Unprocessable Entity.HttpClientErrorExceptionfor 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.HttpServerErrorExceptionfor HTTP status 502 Bad Gateway.HttpServerErrorExceptionfor status HTTP 504 Gateway Timeout.HttpServerErrorExceptionfor status HTTP 500 Internal Server Error.HttpServerErrorExceptionfor status HTTP 501 Not Implemented.HttpServerErrorExceptionfor status HTTP 503 Service Unavailable.Abstract base class for exceptions based on anHttpStatusCode.A basic, no operationResponseErrorHandlerimplementation suitable for ignoring any error using theRestTemplateorRestClient.Callback interface for code that operates on aClientHttpRequest.Exception thrown when an I/O error occurs.Strategy interface used by theRestTemplateandRestClientto 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 ofClientHttpResponsethat can convert the body.Defines the contract forRestClient.RequestHeadersSpec.exchange(ExchangeFunction).Variant ofRestClient.RequestHeadersSpec.ExchangeFunctionreturning a non-null required value.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 byRestClientandRestTemplatein case a request fails because of a server error response, a 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 suitableHttpMessageConvertercould be found to extract the response.Exception thrown when an unknown (or custom) HTTP status code is received.