Exclude body when only 'get' is defined

This commit is contained in:
Stef Heyenrath
2017-03-23 11:09:09 +01:00
parent 6784614814
commit b547993415

View File

@@ -553,7 +553,7 @@ namespace WireMock.Server
Funcs = Map(pm.Funcs)
}).ToList() : null,
Body = new BodyModel
Body = methodMatcher?.Methods != null && methodMatcher.Methods.Count(m => m == "get") == 1 ? null : new BodyModel
{
Matcher = bodyMatcher != null ? Map(bodyMatcher.Matcher) : null,
Func = bodyMatcher != null ? Map(bodyMatcher.Func) : null,