Skip to content

Commit e26c1c4

Browse files
committed
Documentation request matcher methods
1 parent dfab1e3 commit e26c1c4

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

netmockery/documentation.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,23 @@ The ``match`` parameter within the ``responses`` list can match requests using o
123123
]
124124
}
125125

126+
### Limiting HTTP methods
127+
128+
The ``match`` object can have an optional ``methods`` property to match requests by HTTP method.
129+
130+
Example, match PUT and POST requests:
131+
132+
"match": {
133+
"methods": "PUT POST"
134+
}
135+
136+
Example, match regular expression, only GET requests:
137+
138+
"match": {
139+
"regex": "...",
140+
"methods": "GET"
141+
}
142+
126143
## Response creation
127144

128145
Several parameters inside the ``responses`` list control how netmockery creates the response.

0 commit comments

Comments
 (0)