mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 14:20:29 +01:00
Request Matching Wiki - include JSON example (specification) of each matching part available #492
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 20, 2023).
Originally assigned to: @StefH on GitHub.
At present on this section of the Wiki, there isn't a clear list of what the names of matching parts are and if they are single objects or arrays.
https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#one-request-matching
Ideally, a table or a simple JSON example of each would be ideal, like there is for Query Parameters.
https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching#query-parameters
Most of the matching parts can be found somewhere on that page via a search under one of the Matchers, however, I couldn't find any example of the 'Url' matching part.
I found it was Matchers (multiple) via trial and error.
Also, it seems that some matching part types can't be used together. I hit this when trying to use 'Url' and 'Path' together. After a GitHub search and looking at code results, I noticed this:
b1032c9dcd/src/WireMock.Org.Abstractions/Request.cs (L11)So just moved the logic from my
Pathinto theUrland combined them into a single Regex to trigger when any parameters are provided for a specific URL.@StefH commented on GitHub (Aug 10, 2023):
Wiki updated.
https://github.com/WireMock-Net/WireMock.Net/wiki/Request-Matching