-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
How to get matched mapping by HttpRequest or HttpRequestMessage #772
Comments
@marspox The only way now it is to send the HttpRequest or HttpRequestMessage to WireMock.Net and see if the response is valid and you can verify the matched mappings. |
I see, but after sending HttpRequest I still don't know which mapping has been applied to get response. |
I have the same difficulty, I wanted to compare the map described with the map that was actually registered to locate the error but nothing is possible. |
A possible solution would be that you can use response templating to return the GUID from the matched mapping as a header for example. So "Response" : {
"Headers" : [
"Matched-Mapping-Guid": "{{mapping.guid}}"
],
"UseTransformer" : true
} Would that be ok? |
A preview version (how to use preview : https://github.com/WireMock-Net/WireMock.Net/wiki/MyGet-preview-versions) |
Hi StefH, |
@MychellSantos |
@marspox and @MychellSantos |
@marspox and @MychellSantos : The PR is merged to master, a new NuGet will be released soon. |
I do not activate time to test, I will evaluate the next package... |
Hello,
I would like to know wheather is it possible to get mapping by HttpRequest or HttpRequestMessage.
Let's say that I have HttpRequest/HttpRequestMessage object then based on its values I would like to find out which mapping will be matched for that request.
The text was updated successfully, but these errors were encountered: