Add FormUrlEncodedMatcher (#1147)

* FormUrlEncodedMatcher

* .

* Fix

* new

* support wildcard
This commit is contained in:
Stef Heyenrath
2024-07-27 14:40:23 +02:00
committed by GitHub
parent 926eaaece4
commit 3353be65b5
10 changed files with 530 additions and 30 deletions

View File

@@ -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()
);