Package org.craftercms.commons.rest
package org.craftercms.commons.rest
-
ClassDescriptionBase class for all Crafter REST clients.Class that provides the basic
ExceptionHandlers for Crafter REST services.ResponseErrorHandlerthat converts the body of a response with error status code usingHttpMessageConverters, and then throws aRestServiceExceptionwith the deserialized response body as theerrorDetails.Writes the response using aHttpMessageConverterchosen 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 ofRestTemplatethat adds the following custom functionality: Forces the use ofHttpComponentsClientHttpRequestFactory, to avoid issues with 40x responses.HttpMessageConvertingResponseErrorHandleris used by default.Very simple class that can be returned by REST API methods to indicate a result with a message, generally for success.