mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-17 23:14:23 +01:00
Updated Request Matcher : FormUrlEncodedMatcher (markdown)
@@ -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
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user