vert-x3 / vertx-web

HTTP web applications for Vert.x
Apache License 2.0
1.11k stars 535 forks source link

New web client expectation API #2607

Closed vietj closed 6 months ago

vietj commented 6 months ago

Documentation is updated with the HTTP response expectation API, response predicate API is deprecated.

Fyro-Ing commented 5 months ago

Hi

Now, with this solution, response body is decoded before expect test, with BodyCodec But when success body result is not same as error body result, there is DecodedException

webclient.post(xx)
.as(json(Integer.class)
.send()
.expecting(SC_SUCCESS)

ok body is "5"

error body is json as 
{
  code: mycode
  message: message
}