mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-04-10 03:13:53 +02:00
Updated Request Matching (markdown)
@@ -1,14 +1,45 @@
|
|||||||
# Request Matching
|
# :one: Request Matching
|
||||||
WireMock supports matching of requests to stubs and verification queries using the following attributes:
|
WireMock.Net supports matching of requests to stubs and verification queries using the following parts:
|
||||||
|
|
||||||
* Path/URL
|
* Path
|
||||||
|
* URL
|
||||||
* HTTP Method
|
* HTTP Method
|
||||||
* Query parameters
|
* Query parameters
|
||||||
* Headers
|
* Headers
|
||||||
* Cookies
|
* Cookies
|
||||||
* Request Body
|
* 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.
|
The following paragraphs describe in detail which matchers can be used.
|
||||||
|
|
||||||
At this moment these matchers are supported:
|
At this moment these matchers are supported:
|
||||||
|
|||||||
Reference in New Issue
Block a user