vertx-lang-scala-docs_2.12 3.6.0 API < Back
 

# Packages

-  package root
  Definition Classes
    root
-  package io
  Definition Classes
    root
-  package vertx
  Definition Classes
    io
-  package scala
  Definition Classes
    vertx
-  package ext
  Definition Classes
    scala
-  package web
  Definition Classes
    ext
-  package client
  Definition Classes
    web
-  package predicate
  Definition Classes
    client
- ErrorConverter
- ResponsePredicate
- ResponsePredicateResult

p

io.vertx.scala.ext.web.client

# predicate 

#### package predicate

 
Ordering

1. Alphabetic

Visibility

1. Public
2. All

### Type Members

1.  class ErrorConverter extends AnyRef

   Converts a io.vertx.scala.ext.web.client.predicate.ResponsePredicateResult to a `Throwable` describing the error.

2.  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.

3.  class ResponsePredicateResult extends AnyRef

   Represents the outcome of a io.vertx.scala.ext.web.client.predicate.ResponsePredicate applied to an .

### Value Members

1.  object ErrorConverter
2.  object ResponsePredicate
3.  object ResponsePredicateResult

### Ungrouped