class ResponsePredicate extends AnyRef
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.
- Alphabetic
- By Inheritance
- ResponsePredicate
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new ResponsePredicate(_asJava: AnyRef)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def asJava: AnyRef
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
errorConverter(): ErrorConverter
- returns
the error converter currently used
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )