package predicate
- Alphabetic
- Public
- All
Type Members
-
class
ErrorConverter extends AnyRef
Converts a io.vertx.scala.ext.web.client.predicate.ResponsePredicateResult to a
Throwable
describing the error. -
class
ResponsePredicate extends AnyRef
A predicate on .
A predicate on .
By default, a Vert.x Web Client request ends with an error only if something wrong happens at the network level. In other words, a
404 Not Found
response, or a response with the wrong content type, are NOT considered as failures.io.vertx.scala.ext.web.client.predicate.ResponsePredicate can fail a request when the response does not match some criteria.
Custom predicate instances can be used with .
As a convenience, a few predicates for common uses cases are predefined. For example:
- io.vertx.scala.ext.web.client.predicate.ResponsePredicate to verify that the response has a
2xx
code, or - io.vertx.scala.ext.web.client.predicate.ResponsePredicate to verify that the response body contains JSON data.
- ...
Predefined predicates use the default error converter (discarding the body).
However, you can create a new io.vertx.scala.ext.web.client.predicate.ResponsePredicate instance from an existing one using io.vertx.scala.ext.web.client.predicate.ResponsePredicate#create or io.vertx.scala.ext.web.client.predicate.ResponsePredicate#create when the body is required to build the validation failure.
- io.vertx.scala.ext.web.client.predicate.ResponsePredicate to verify that the response has a
-
class
ResponsePredicateResult extends AnyRef
Represents the outcome of a io.vertx.scala.ext.web.client.predicate.ResponsePredicate applied to an .
Value Members
- object ErrorConverter
- object ResponsePredicate
- object ResponsePredicateResult