程序包 cn.taketoday.web.client
@NonNullApi
@NonNullFields
package cn.taketoday.web.client
Core package of the client-side web support.
Provides the RestTemplate and RestClient.
-
类说明Default implementation of the
ResponseErrorHandlerinterface.Default implementation ofRestClient.Default implementation ofRestClient.Builder.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 status HTTP HTTP 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.Implementation ofClientHttpResponsethat can not only check if the response has a message body, but also if its length is 0 (i.e. empty) by actually reading the input stream.Callback interface for code that operates on aClientHttpRequest.Exception thrown when an I/O error occurs.Strategy interface used by theRestTemplateto 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 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.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 byRestTemplatein 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.Internal methods shared between types in this package.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.Response extractor that extracts the responseHttpHeaders.Used byDefaultRestClientandDefaultRestClientBuilder.Raised when no suitableHttpMessageConvertercould be found to extract the response.Exception thrown when an unknown (or custom) HTTP status code is received.