diff --git a/Request-Matching.md b/Request-Matching.md index 30a67ed..9893ba3 100644 --- a/Request-Matching.md +++ b/Request-Matching.md @@ -1,14 +1,45 @@ -# Request Matching -WireMock supports matching of requests to stubs and verification queries using the following attributes: +# :one: Request Matching +WireMock.Net supports matching of requests to stubs and verification queries using the following parts: -* Path/URL +* Path +* URL * HTTP Method * Query parameters * Headers * Cookies * Request Body -# Matchers +## Example Matching for the elements + +### Query Parameters +#### C# exceprt +``` c# +server + .Given(Request + .Create() + .WithParam("search", "abc") +``` + +#### JSON exceprt +``` json +{ + "Request": { + "Params": [ + { + "Name": "search", + "Matchers": [ + { + "Name": "ExactMatcher", + "Pattern": "abc" + } + ] + } + ] + } +} +``` + +# :two: Matchers The following paragraphs describe in detail which matchers can be used. At this moment these matchers are supported: