mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Request filtering by not method(s) #487
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 17, 2023).
Currently, a mapping can be against a list of method types (GET, PUT, etc) in the JSON mapping definition.
Is there a way to map to all methods other than specific types?
For example, I want to have an early catch rejection response saying that the method is not supported, triggering for all methods other than "Get". At present, I'd need to create a mapping like the one below listing all of the method types to catch. Is this the best way?
@StefH commented on GitHub (Feb 17, 2023):
For now, it's only possible to map the HTTP method using a positive matcher.
So your solutioni s correct.