mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
How can I create a stub that responds only for headers with multiple values? #458
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 @basdijkstra on GitHub (Oct 10, 2022).
So, I've got a request that contains a header with multiple values (in this case, 2), and I want to write a stub that responds only when that header has both these values:

I've tried
as well as
and also
but none of them work. Could someone please show me how to do this properly?
@basdijkstra commented on GitHub (Oct 10, 2022):
Nevermind, I figured it out. Mistake on my end: I didn't call the code that added the mock response to the stub server.
For those who are interested, once I did that, this response definition worked: