Support for string and object in JsonMatcher. (#157)

* JsonMatcher (#154)

* small update in example code
This commit is contained in:
Stef Heyenrath
2018-06-26 23:20:30 +02:00
committed by GitHub
parent b2690017a8
commit 4283732b6c
13 changed files with 135 additions and 42 deletions

View File

@@ -238,7 +238,11 @@ namespace WireMock.Server
}
});
if (requestMessage.Body != null)
if (requestMessage.BodyAsJson != null)
{
request.WithBody(new JsonMatcher(MatchBehaviour.AcceptOnMatch, requestMessage.BodyAsJson));
}
else if (requestMessage.Body != null)
{
request.WithBody(new ExactMatcher(MatchBehaviour.AcceptOnMatch, requestMessage.Body));
}