public class RestTemplate
extends org.springframework.web.client.RestTemplate
RestTemplate that adds the following custom
functionality:
HttpComponentsClientHttpRequestFactory,
to avoid issues with 40x responses.HttpMessageConvertingResponseErrorHandler is used by default.| Modifier and Type | Field and Description |
|---|---|
protected Class<?> |
errorResponseType |
| Constructor and Description |
|---|
RestTemplate() |
RestTemplate(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters) |
| Modifier and Type | Method and Description |
|---|---|
void |
init() |
void |
setErrorResponseType(Class<?> errorResponseType) |
acceptHeaderRequestCallback, delete, delete, delete, doExecute, exchange, exchange, exchange, exchange, exchange, exchange, exchange, exchange, execute, execute, execute, getErrorHandler, getForEntity, getForEntity, getForEntity, getForObject, getForObject, getForObject, getMessageConverters, getUriTemplateHandler, handleResponse, headersExtractor, headForHeaders, headForHeaders, headForHeaders, httpEntityCallback, httpEntityCallback, optionsForAllow, optionsForAllow, optionsForAllow, patchForObject, patchForObject, patchForObject, postForEntity, postForEntity, postForEntity, postForLocation, postForLocation, postForLocation, postForObject, postForObject, postForObject, put, put, put, responseEntityExtractor, setDefaultUriVariables, setErrorHandler, setMessageConverters, setUriTemplateHandlergetInterceptors, getRequestFactory, setInterceptorsprotected Class<?> errorResponseType
public RestTemplate()
public RestTemplate(List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
public void setErrorResponseType(Class<?> errorResponseType)
@PostConstruct public void init()
Copyright © 2018 CrafterCMS. All rights reserved.