Package org.springframework.web.client
@NullMarked
package org.springframework.web.client
Core package of the client-side web support.
Provides the RestTemplate and RestClient.
-
ClassDescriptionContract to format the API version for a request.Contract to insert an API version into the URI or headers of a request.Builder for
ApiVersionInserter.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.as of 7.1 in favor ofRestClient.ResponseSpec.ErrorHandlerException 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 Content.Deprecated.since 7.0 in favor ofHttpClientErrorException.UnprocessableContentHttpClientErrorExceptionfor status HTTP 415 Unsupported Media Type.Deprecated, for removal: This API element is subject to removal in a future version.as of 7.1 with no replacement.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.Deprecated, for removal: This API element is subject to removal in a future version.as of 7.1 in favor ofRestClient.ResponseSpec.ErrorHandlerDeprecated, for removal: This API element is subject to removal in a future version.as of 7.1 in favor ofRestClient.RequestHeadersSpec.httpRequest(Consumer).Exception thrown when an I/O error occurs.Deprecated, for removal: This API element is subject to removal in a future version.as of 7.1 in favor ofRestClient.ResponseSpec.ErrorHandlerDeprecated, for removal: This API element is subject to removal in a future version.as of 7.1 in favor ofRestClient.RequestHeadersSpec.exchange(RestClient.RequestHeadersSpec.ExchangeFunction).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.Deprecated, for removal: This API element is subject to removal in a future version.as of 7.1, in favor ofRestClient.Deprecated, for removal: This API element is subject to removal in a future version.as of 7.1, in favor ofRestClient.Raised when no suitableHttpMessageConvertercould be found to extract the response.Exception thrown when an unknown (or custom) HTTP status code is received.
RestClient.ResponseSpec.ErrorHandler