mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-03-12 21:35:55 +01:00
Updated Request Matching (markdown)
@@ -1,14 +1,45 @@
|
||||
# Request Matching
|
||||
WireMock supports matching of requests to stubs and verification queries using the following attributes:
|
||||
# :one: Request Matching
|
||||
WireMock.Net supports matching of requests to stubs and verification queries using the following parts:
|
||||
|
||||
* Path/URL
|
||||
* Path
|
||||
* URL
|
||||
* HTTP Method
|
||||
* Query parameters
|
||||
* Headers
|
||||
* Cookies
|
||||
* Request Body
|
||||
|
||||
# Matchers
|
||||
## Example Matching for the elements
|
||||
|
||||
### Query Parameters
|
||||
#### C# exceprt
|
||||
``` c#
|
||||
server
|
||||
.Given(Request
|
||||
.Create()
|
||||
.WithParam("search", "abc")
|
||||
```
|
||||
|
||||
#### JSON exceprt
|
||||
``` json
|
||||
{
|
||||
"Request": {
|
||||
"Params": [
|
||||
{
|
||||
"Name": "search",
|
||||
"Matchers": [
|
||||
{
|
||||
"Name": "ExactMatcher",
|
||||
"Pattern": "abc"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# :two: Matchers
|
||||
The following paragraphs describe in detail which matchers can be used.
|
||||
|
||||
At this moment these matchers are supported:
|
||||
|
||||
Reference in New Issue
Block a user