mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Admin API fails to create a mapping with Request Body matching #281
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 @yunj on GitHub (Jul 9, 2020).
Describe the bug
Admin API is used to create a mapping which has some sort of request body match, but other matches get created except body.
Expected behavior:
Body match should appear when querying
GET __admin/mappings.Test to reproduce
Admin API is used to create the following mapping.
The response from
GET __admin/mappings@StefH commented on GitHub (Jul 9, 2020):
Thank you.
I'll investigate.
@StefH commented on GitHub (Jul 9, 2020):
@yunj
The root cause is that you don't provide the Methods on you wish to match. The current code does not return the bodymatcher if there are no Methods defined or if the methods have a 'get'.
I'll investigate why I did add this check in the code.
For your solution now: set the Methods.
@StefH commented on GitHub (Jul 9, 2020):
https://github.com/WireMock-Net/WireMock.Net/pull/487
@StefH commented on GitHub (Jul 9, 2020):
Fixed.
New NuGet and Docker will be released soon.
@yunj commented on GitHub (Jul 9, 2020):
@StefH thanks very much for your quick fix.