我想使用 Wiremock dotnet 匹配请求正文。示例请求正文
{“姓名”:“ashutosh”,“年龄”:33 }
我想将它与年龄或姓名等键值组合之一匹配。
我尝试了以下组合,但似乎没有任何匹配项
"Body":{
"Matcher": {
"Name": "JsonPathMatcher",
"Pattern": "$.[?(@.name == 'ashutosh')]"
}
}
"Body":{
"Matcher": {
"Name": "JsonMatcher",
"Pattern": "{ \"age\": 33}"
}
}
有人可以帮我吗?提前致谢