mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Improve matcher for BodyType.MultiPart #208
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 @davidshen84 on GitHub (Sep 6, 2019).
ref:
2f406029c9/src/WireMock.Net/Matchers/Request/RequestMessageBodyMatcher.cs (L130)Based on the above code, a body which is detected as BodyType.MultiPart will not be tested by an
IStringMatcher.Because all HTTP bodies are plain text, I think it is quite safe to use an
IStringMatcherto test the content of a MultiPart body.For example, a MultiPart body that looks like below after encoded.
One can use a string matcher to test if a string "test file content" is presented.
@davidshen84 commented on GitHub (Sep 6, 2019):
Not working if there are binary data :(