mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Assign Variable in Request Body (Canned JSON File) #366
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @devmariodiaz on GitHub (Oct 7, 2021).
Hello Stef,
I hope everything is doing well.
Could you please let me know if there is a way to replace "Pattern" parameter in post request with a filename i.e "request.xml" or variable?
I really appreciate it
i.e "PatternAsFile": "requestbody.xml" such as Request Templating.
SOAPconfiguration.json.zip
@StefH commented on GitHub (Oct 8, 2021):
Hello Mario.
This is not yet implemented.
This can be done like you propose:
Another option would be:
@StefH commented on GitHub (Oct 9, 2021):
Hello @devmariodiaz,
I think that
"PatternAsFile": "requestbody.xml"is the most logical option. Do you agree?@devmariodiaz commented on GitHub (Oct 11, 2021):
Thanks, Stef for your dedicated time.
I'll test this great solution
@StefH commented on GitHub (Oct 11, 2021):
(Note that PatternAsFile is not yet implemented, so you cannot test that)
@devmariodiaz commented on GitHub (Oct 11, 2021):
I got it 👍
@StefH commented on GitHub (Oct 12, 2021):
https://github.com/WireMock-Net/WireMock.Net/pull/651
@StefH commented on GitHub (Oct 12, 2021):
Hello @devmariodiaz ,
I've created a preview version
1.4.23-ci-15479which should implement this.For info on preview versions ; see https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions
@devmariodiaz commented on GitHub (Oct 15, 2021):
Hello Stef,
I was testing this solution and it's working fine, would you please incorporate this feature in the next version.
Thanks a lot for your time.
@StefH commented on GitHub (Oct 15, 2021):
Hello Mario,
Thanks for testing, I'll merge this code.