From c47f7605340c3fca919d819dbd31df69a58b9d98 Mon Sep 17 00:00:00 2001 From: Stef Heyenrath Date: Sat, 27 Jul 2024 11:32:53 +0200 Subject: [PATCH] Updated Request Matcher : FormUrlEncodedMatcher (markdown) --- Request-Matcher-:-FormUrlEncodedMatcher.md | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/Request-Matcher-:-FormUrlEncodedMatcher.md b/Request-Matcher-:-FormUrlEncodedMatcher.md index 5be371b..66c1179 100644 --- a/Request-Matcher-:-FormUrlEncodedMatcher.md +++ b/Request-Matcher-:-FormUrlEncodedMatcher.md @@ -9,7 +9,7 @@ server.Given( .UsingPost() .WithPath("/foo") .WithHeader("Content-Type", "application/x-www-form-urlencoded") - .WithBody(new FormUrlEncodedMatcher(["name=John Doe", "email=johndoe@example.com"])) + .WithBody(new FormUrlEncodedMatcher(["name=John Snow", "email=john_snow@example.com"])) ) .RespondWith( Response.Create() @@ -47,24 +47,15 @@ server.Given( "Matcher": { "Name": "FormUrlEncodedMatcher", "Patterns": [ - "grant_type=client_credentials", - "client_id=DDCD99EE1531484E4E21D5EC9FBA5D8B", - "client_secret=RERDRDk5RUUxNTMxNDg0RTRFMjFENUVDOUZCQTVEOEI%3D" + "name=John Snow", + "email=john_snow@example.com" ], "IgnoreCase": true } } }, "Response": { - "StatusCode": 200, - "BodyAsJson": { - "access_token": "eyJhbGciOiJub25lIiwidHlwIjoiSldUIn0.eyJjbGllbnRUeXBlIjoiU2VydmVyIiwiYXVkIjoidHJhbnNhY3Rpb24iLCJuYmYiOjE3MjE3MjU2NDMsImV4cCI6MTcyMjMzMDQ0MywiaWF0IjoxNzIxNzI1NjQzfQ.", - "token_type": "Bearer", - "expires_in": 3599 - }, - "Headers": { - "Content-Type": "application/json" - } + "StatusCode": 200 } } ```