Class NoOpResponseErrorHandler
java.lang.Object
org.springframework.web.client.NoOpResponseErrorHandler
- All Implemented Interfaces:
ResponseErrorHandler
@Deprecated(since="7.1",
forRemoval=true)
public final class NoOpResponseErrorHandler
extends Object
implements ResponseErrorHandler
Deprecated, for removal: This API element is subject to removal in a future version.
A basic, no operation
ResponseErrorHandler implementation suitable
for ignoring any error using the RestTemplate or RestClient.
This implementation is not suitable with the RestClient as it uses
a list of candidates where the first matching is invoked. If you want to
disable default status handlers with the RestClient, consider
registering a noop ErrorHandler with a
predicate that matches all status code, see
RestClient.Builder.defaultStatusHandler(Predicate, ErrorHandler).
- Since:
- 6.1.7
- Author:
- Stephane Nicoll
-
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasError(ClientHttpResponse response) Deprecated, for removal: This API element is subject to removal in a future version.Indicate whether the given response has any errors.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ResponseErrorHandler
handleError
-
Constructor Details
-
NoOpResponseErrorHandler
public NoOpResponseErrorHandler()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
hasError
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ResponseErrorHandlerIndicate whether the given response has any errors.Implementations will typically inspect the
HttpStatusof the response.- Specified by:
hasErrorin interfaceResponseErrorHandler- Parameters:
response- the response to inspect- Returns:
trueif the response indicates an error;falseotherwise- Throws:
IOException- in case of I/O errors
-
RestClient.ResponseSpec.ErrorHandler