-
-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post request with "BodyAsBytes" is not matched by RegexMatcher #624
Comments
Hello @FSatmar , I understand your point, however when the body is just bytes, a RegExMatcher/WildcardMatcher (= StringMatcher) cannot be used because I never know if the bytes area actually a string (and which encoding is used). So I think what could be a solution for you is that a new matcher like Another option would be to update the |
Is there an option to define a matcher that would match any type of body and any content? as in this case I don't care about the body content. otherwise, it seems I'll need to create 2 mappings, one for each body type. |
I've added a Try the MyGet preview version: |
This works great, thank you very much! |
@FSatmar OK I'll merge the PR and create a new official version in some time. |
Describe the bug
When a mapping is in place for a Post request with Body RegexMatcher = ".*" and a request with "BodyAsBytes" is made, the mapping is not returned.
Expected behavior:
The mapping should be returned since the RegexMatcher should match any body content.
Test to reproduce
Other related info
Please see attached files for examples of mapping and requests. Note that Request1with String body type works, while Request2 with BodyAsBytes fails.
Mapping.txt
Request1.txt
Request2.txt
Also note that this used to work fine in version 1.0.9.
The text was updated successfully, but these errors were encountered: