Package org.craftercms.commons.rest
package org.craftercms.commons.rest
-
ClassDescriptionBase class for all Crafter REST clients.Class that provides the basic
ExceptionHandler
s for Crafter REST services.ResponseErrorHandler
that converts the body of a response with error status code usingHttpMessageConverter
s, and then throws aRestServiceException
with the deserialized response body as theerrorDetails
.Writes the response using aHttpMessageConverter
chosen depending on the acceptable media types from the request (most of the code is just a copy from Spring'sAbstractMessageConverterMethodProcessor
).REST client request interceptor that logs the whole request and response.Exception thrown when an error is received from a REST service.Utility methods for RESTful services.Simple extension ofRestTemplate
that adds the following custom functionality: Forces the use ofHttpComponentsClientHttpRequestFactory
, to avoid issues with 40x responses.HttpMessageConvertingResponseErrorHandler
is used by default.Very simple class that can be returned by REST API methods to indicate a result with a message, generally for success.