Classes
Methods
(static) ResponsePredicate.contentType(mimeTypes) → {ResponsePredicate}
Creates a predicate validating the response has a
content-type header matching one of the mimeTypes.
Parameters:
| Name | Type | Description |
|---|---|---|
mimeTypes |
Array.<string> | the list of mime types |
Returns:
- Type
- ResponsePredicate
(static) ResponsePredicate.create(test, errorConverter) → {ResponsePredicate}
Creates a new ResponsePredicate, using a custom
errorConverter.
Parameters:
| Name | Type | Description |
|---|---|---|
test |
function | the function to invoke when the response is received |
errorConverter |
ErrorConverter | converts the result of the test function to a Throwable |
Returns:
- Type
- ResponsePredicate
(static) ResponsePredicate.status(min, max) → {ResponsePredicate}
Creates a predicate asserting that the status response code is in the
[min,max[ range.
Parameters:
| Name | Type | Description |
|---|---|---|
min |
number | the lower (inclusive) accepted status code |
max |
number | the highest (exclusive) accepted status code |
Returns:
- Type
- ResponsePredicate