Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use of ExpectationForwardAndResponseCallback with forward. #1927

Open
max-m-s opened this issue Dec 2, 2024 · 0 comments
Open

Use of ExpectationForwardAndResponseCallback with forward. #1927

max-m-s opened this issue Dec 2, 2024 · 0 comments

Comments

@max-m-s
Copy link

max-m-s commented Dec 2, 2024

(This might a documentation issue rather than a bug)

I'm trying to run a mockserver as a proxy that handles JOSE then fowards the clear payload, then encrypts the response. But I don't understand how to define both a foward (the destination) and a callback at the same time, as this appears to be invalid:

{ "id": "1", "httpRequest": { "path": "" }, "httpForward": { "host": "127.0.0.1", "port": 6082, "scheme": "HTTP" }, "httpForwardClassCallback": {"callbackClass": "my.package.MyCallback"} }

Since you can only define a "httpForward" or a "httpForwardClassCallback" but not both. If I only define "httpForwardClassCallback" how do I tell it where to go? Is there something to set in the HttpRequest object during the callback?

The example using the ExpectationForwardAndResponseCallback class doesn't explain this either, or ExpectationForwardCallback for that matter.

I've also tried adding two Expectations, but only the first one added is invoked.

Does anyone have any examples of how to use these?

MockServer Version: 5.13.1 (latest shaded version available on corporate repo). I cannot access the public Maven.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant