-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Question/Feature: Add support for selecting XPath in response template #397
Comments
This is not yet supported, this could be a valuable addition.
I'll take a look at the code how to implement this. |
I am happy to do a PR for this if okay. |
You can make a PR. For reference see the https:/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net/Transformers/HandleBarsJsonPath.cs file. Also make sure to add unit-tests for this new transformer. For reference, see https:/WireMock-Net/WireMock.Net/blob/master/test/WireMock.Net.Tests/ResponseBuilders/ResponseWithHandlebarsJsonPathTests.cs |
Hi,
I am looking to transform soap response. And it would be good if i can use the XPath to select values from request. I believe it can be done using regex but XPath would be a natural fit for this use case.
Question: Is it already supported?
If not happy to do a PR. It would be similar to how json template work.
"{{XPath.Select request.body "/todo-list/todo-item[1]/text()"}}") to return text of 1st element in response.
The text was updated successfully, but these errors were encountered: