diff --git a/Request-Matcher-:-FormUrlEncodedMatcher.md b/Request-Matcher-:-FormUrlEncodedMatcher.md index 34fa6cc..5be371b 100644 --- a/Request-Matcher-:-FormUrlEncodedMatcher.md +++ b/Request-Matcher-:-FormUrlEncodedMatcher.md @@ -4,7 +4,16 @@ Can be used to check if a Form Url Encoded body contains the key-value pairs. #### C# option ```csharp var server = WireMockServer.Start(); -// todo +server.Given( + Request.Create() + .UsingPost() + .WithPath("/foo") + .WithHeader("Content-Type", "application/x-www-form-urlencoded") + .WithBody(new FormUrlEncodedMatcher(["name=John Doe", "email=johndoe@example.com"])) + ) + .RespondWith( + Response.Create() + ); ``` #### JSON Mapping option @@ -15,7 +24,7 @@ var server = WireMockServer.Start(); "Matchers": [ { "Name": "WildcardMatcher", - "Pattern": "/api" + "Pattern": "/foo" } ] }, @@ -41,7 +50,8 @@ var server = WireMockServer.Start(); "grant_type=client_credentials", "client_id=DDCD99EE1531484E4E21D5EC9FBA5D8B", "client_secret=RERDRDk5RUUxNTMxNDg0RTRFMjFENUVDOUZCQTVEOEI%3D" - ] + ], + "IgnoreCase": true } } },