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

Extending PostServeAction questions #585

Closed
EllaVader opened this issue Jan 19, 2017 · 1 comment
Closed

Extending PostServeAction questions #585

EllaVader opened this issue Jan 19, 2017 · 1 comment
Labels

Comments

@EllaVader
Copy link

Hello,
I have 2 questions about extending the PostServeAction class.

  1. I am not seeing a way to register for it on a per-stub basis vs globally. I logic in the doAction() method, but it is not going into it. And I am not seeing as way to change the applyGlobally() flag like you can in the Transformations. Is it possible to only have this action respond to a specific stub?

  2. I'm noticing that the serveEvent.getResponse() is always null. I am not seeing a way to view the response that was sent back. I'm seeing the request, but not the response.

Hopefully someone can clarify this for me super-quick :) Thanks in advance

@tomakehurst
Copy link
Member

  1. You can do it, but it's a slightly different model than other extensions because the method signature when applied globally is a bit different. See: https://github.com/tomakehurst/wiremock/blob/master/src/test/java/com/github/tomakehurst/wiremock/PostServeActionExtensionTest.java#L55

  2. Confirmed bug, thanks.

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

No branches or pull requests

2 participants