Updated Request Matcher : FormUrlEncodedMatcher (markdown)

Stef Heyenrath
2024-07-27 11:32:53 +02:00
parent 94a76e3106
commit c47f760534

@@ -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
}
}
```