Package sk.antons.sbutils.rest
Class RestTemplateClient.ResponseValidator
java.lang.Object
sk.antons.sbutils.rest.RestTemplateClient.ResponseValidator
- Enclosing class:
- RestTemplateClient
ResponseValidator builder (check if response is ok - if not exception is thrown.)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Predicate<org.springframework.http.ResponseEntity>listedCodes(int... codes) Checks if response code is one of listedstatic Predicate<org.springframework.http.ResponseEntity>Checks if response code is 2xx
-
Constructor Details
-
ResponseValidator
public ResponseValidator()
-
-
Method Details
-
successful
Checks if response code is 2xx -
listedCodes
Checks if response code is one of listed
-