GithubHelp home page GithubHelp logo

Ersatz proxy support in 3.x about ersatz HOT 9 CLOSED

radarsh avatar radarsh commented on August 21, 2024
Ersatz proxy support in 3.x

from ersatz.

Comments (9)

cjstehno avatar cjstehno commented on August 21, 2024 1

The 3.2 release has been published to the maven central repo - it may take some time to fully propagate.

from ersatz.

cjstehno avatar cjstehno commented on August 21, 2024

I'll see what I can do.

from ersatz.

cjstehno avatar cjstehno commented on August 21, 2024

Actually, it was basically a stand-alone component anyway, it should not be a big deal to rebuild it. I will add it to the next release. If I can pull together some time, I will see if I can cut a release within a month or two.

from ersatz.

radarsh avatar radarsh commented on August 21, 2024

Thank you. Really appreciate the work you do with this library.

from ersatz.

cjstehno avatar cjstehno commented on August 21, 2024

Just curious, is is this an open source project, or would you be interested in building off a branch and trying it out when it's ready?

from ersatz.

radarsh avatar radarsh commented on August 21, 2024

It's not an open source project unfortunately but I would be happy to build off a branch and try it out internally.

from ersatz.

cjstehno avatar cjstehno commented on August 21, 2024

I had an idea for what I feel is a better version of the old proxy server, and I'd like to see if it would satisfy your use case.

I am adding a "forwarding" feature as a new type of response provider in the main expectations API, so that you could configure something like the following:

ersatz.expectations(expect -> {
    expect.GET("/some/path", req -> {
        // optional request matching
        req.forward("http://someother:1234");
    });
});

which would forward the request to the provided host/port and then return its response as the returned response. To me this seems like it would accomplish the same thing as the old proxy, but you'd also get the request matching for free.

Is there something in your case that I am misunderstanding?

Note: if its a matter of changing a lot of test config - I could bring back the old style as well for a release (deprecated) so that you'd have time to change things over. I am more interested in whether this idea can eventually replace it.

from ersatz.

cjstehno avatar cjstehno commented on August 21, 2024

@radarsh You can checkout the new-proxy-impl branch and see if that will take care of your use case. Note that I am doing what I mentioned above - the stand-alone proxy server will be around until release 4.0 and then it will be removed again. Please let me know if the new "forwarding" functionality will work for you, and if not, what is missing?

Unless you find anything, I will plan on cutting the 3.2 release sometime next week.

from ersatz.

cjstehno avatar cjstehno commented on August 21, 2024

This has been added to release 3.2, which will be released on Monday.

from ersatz.

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.