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

Not Recording Post Body #49

Closed
henrywasserman opened this issue Sep 9, 2013 · 9 comments
Closed

Not Recording Post Body #49

henrywasserman opened this issue Sep 9, 2013 · 9 comments

Comments

@henrywasserman
Copy link

This is a feature request. It would be nice if we could record post body strings. We have the body in the response right before we create the mapping into json. If we send it along then add a little medicine to the json creation we should be good to go.

@tomakehurst
Copy link
Member

Do you mean when recording stubs, POST/PUT request bodies should be captured and used as the resulting matching criteria (in addition to URL + method)?

@henrywasserman
Copy link
Author

yes

@tomakehurst
Copy link
Member

I'll add it to the backlog

@henrywasserman
Copy link
Author

great. It doesn't have to be perfect for the first pass. I have a done a quick two hour hack that's not worth sending you. It just adds the body to the mapping file then does some fixup to the json to format it correctly.

I also have some stuff that allows you to test with or without recording by setting a boolean, and renames the random mapping file to the junit classname-testname so you know at the end what test recorded that file.

@henrywasserman
Copy link
Author

It also automagicallly starts and stops the proxy recorder on windows, linux or mac.

@tomakehurst
Copy link
Member

I should mention that I'm quite busy with other stuff at the moment, so I'm unlikely to get to this any time soon.

If you wanted to polish your changes a bit and ensure there were some decent tests, I'd happily consider a pull request.

@henrywasserman
Copy link
Author

yeah I'm kinda busy too. and your code is so nice, I would hate to hack it up with anything stupid.

@tomakehurst
Copy link
Member

Request body is now recorded if present

@henrywasserman
Copy link
Author

cool thanks

shrutikumar15 pushed a commit to shrutikumar15/wiremock that referenced this issue Aug 13, 2023
Enable the 3.x beta documents publishing flow
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

2 participants