whistle.mock-plugins 1.0.6-beta.22 → 1.0.6-beta.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -241,14 +241,9 @@ module.exports = async function(req, res) {
|
|
|
241
241
|
// 使用URL匹配检查
|
|
242
242
|
const isMatch = isUrlMatchPattern(url, pattern, proxyType);
|
|
243
243
|
|
|
244
|
-
//
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
targetInterface.method.toLowerCase() === 'all' ||
|
|
248
|
-
req.method.toLowerCase() === targetInterface.method.toLowerCase();
|
|
249
|
-
|
|
250
|
-
// 确定匹配结果
|
|
251
|
-
const matchResult = isMatch && methodMatch;
|
|
244
|
+
// 测试接口只验证URL模式匹配,不验证HTTP方法
|
|
245
|
+
// 因为这里的req.method是测试请求的POST方法,与接口配置的HTTP方法无关
|
|
246
|
+
const matchResult = isMatch;
|
|
252
247
|
|
|
253
248
|
// 构建测试结果
|
|
254
249
|
const result = {
|
|
@@ -260,7 +255,7 @@ module.exports = async function(req, res) {
|
|
|
260
255
|
isMatch: matchResult,
|
|
261
256
|
matchDetail: {
|
|
262
257
|
urlMatch: isMatch,
|
|
263
|
-
|
|
258
|
+
note: 'HTTP方法匹配在测试模式下不进行验证,仅验证URL模式匹配'
|
|
264
259
|
}
|
|
265
260
|
};
|
|
266
261
|
|