mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-26 03:11:56 +01:00
Add FormUrlEncodedMatcher (#1147)
* FormUrlEncodedMatcher * . * Fix * new * support wildcard
This commit is contained in:
@@ -24,7 +24,35 @@ server
|
||||
regex: false
|
||||
))
|
||||
)
|
||||
.WithGuid("98fae52e-76df-47d9-876f-2ee32e931d9b")
|
||||
.WithGuid("98fae52e-76df-47d9-876f-2ee32e931002")
|
||||
.RespondWith(Response.Create()
|
||||
);
|
||||
|
||||
server
|
||||
.Given(Request.Create()
|
||||
.UsingMethod("POST")
|
||||
.WithPath("/form-urlencoded")
|
||||
.WithHeader("Content-Type", "application/x-www-form-urlencoded", true)
|
||||
.WithBody("name=John Doe")
|
||||
)
|
||||
.WithGuid("98fae52e-76df-47d9-876f-2ee32e931003")
|
||||
.RespondWith(Response.Create()
|
||||
);
|
||||
|
||||
server
|
||||
.Given(Request.Create()
|
||||
.UsingMethod("POST")
|
||||
.WithPath("/users/post1")
|
||||
.WithBody(new JsonMatcher(
|
||||
value: new
|
||||
{
|
||||
Request = "Hello?"
|
||||
},
|
||||
ignoreCase: false,
|
||||
regex: false
|
||||
))
|
||||
)
|
||||
.WithGuid("98fae52e-76df-47d9-876f-2ee32e931001")
|
||||
.RespondWith(Response.Create()
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user