mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 21:10:32 +01:00
Problem with Request Match WithBody #164
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jafin on GitHub (Feb 12, 2019).
Good afternoon,
I am having trouble understanding what I have configured incorrectly to get a Request match using WithBody. Test below gives 404 when using WithBody and WildcardMatcher or Func matcher.
If I remove the WithBody on the Request then a http OK response occurs.
@jafin commented on GitHub (Feb 12, 2019):
I was able to get a matcher going for body content if I used:
but still unsure why WildcardMatcher or as inline func
WithBody(b=>b.ToString().Contains("access_token")))
did not work.
If anyone could enlighten me that would be great!
@StefH commented on GitHub (Feb 12, 2019):
When using WildcardMatcher, you should use
*as a wildcard character.Like:
@StefH commented on GitHub (Feb 15, 2019):
@jafin : does this solve your issue?
@jafin commented on GitHub (Feb 19, 2019):
yes thanks for the reply.