[Test-Proxy] Customizable Default Matcher, Conditional Matching
- Dominant language
- C#
- Stars
- 135
- Forks
- 260
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 143
Description
The ask here is essentially:
> The standard test matcher has all the capabilities I need, but I need to _tweak_ some of them.
@JoshLove-msft wants to be able to customize the headers that are matched on.
@HarshaNalluru wants the ability to specify "conditional" matching. The ask originally had an example of a request that looks something like this:
```json
{
"requestUriRegex" : "https://login.microsoftonline.com/azuretenantid/oauth2/v2.0/token"
"match-conditions" : {
"match-body" : "false"
"header-list-to-not-match" : [ "Some-Dynamic-Header" ]
}
}
```
`requestUriRegex` could be a URI or a regex. It's intended to be used as a
> only apply these specific conditions if the request URI looks like this.
In terms of conditional matching, we should probably allow parts of the HTTP request to trigger the matching. I can see a specific `Header` or `Body` needing the same behavior.
Contributor guide
Assessment
This issue has not been assessed yet.