mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Header not being processed ? #488
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 @MichaelIDS on GitHub (Feb 16, 2023).
Whenever I send a test request to this static mapping I always get the first result back (priority 1). Even when I have the correct header for Content-Type.
Se example request that should trigger the priority 50 one, but didn't.
On my other (first) endpoint stubs I did positive detection as first (lowest priority value) and then the incomplete detection as later (higher priority values) fallback detection. But I found with this new one I needed to confirm both the headers content-type and authorization, and with WireMock just doing "or" comparisons I thought maybe this invalid stubbing checking was the excepted usage route?
@MichaelIDS commented on GitHub (Feb 16, 2023):
And after hours of trying to work this out, minutes after posting this I realise what the issue was.
I had somehow changed from my Headers having Matchers array to just having a Matcher object. And this was silently failing.
After moving to the blow syntax it works as expected.