Code Monkey home page Code Monkey logo

Comments (5)

vietj avatar vietj commented on July 24, 2024 1

more thoughts about this: since expecting is a construct that operates at the future level and not the http request/response api level, there is no way we can have the decoding happening after the expectation.

Instead the Future.map operator should be used, so the code would actually be like:

webClient
    .get("/test")
    .expecting(expectation)
    .map(response -> response.bodyAsJson(Integer.class));

Therefore we might have to deprecate the the as on HttpRequest to discourage using it, if that can be replaced by the use of map.

from vertx-web.

tsegismont avatar tsegismont commented on July 24, 2024

cc @vietj

from vertx-web.

vietj avatar vietj commented on July 24, 2024

thanks I'll have a look

from vertx-web.

vietj avatar vietj commented on July 24, 2024

I see the behaviour is different for this case, I am thinking that the decoding of the body should be applied only when responses are 2xx that would fix this issue

from vertx-web.

tsegismont avatar tsegismont commented on July 24, 2024

The body may contain useful information (e.g. problem ID) in case of an error response. How can we get it?

from vertx-web.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.