Module: vertx-web-client-js/response_predicate

Classes

ResponsePredicate

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
Source:
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
Source:
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
Source:
Returns:
Type
ResponsePredicate