-
-
Notifications
You must be signed in to change notification settings - Fork 349
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
Can't use matchers in body with 'Content-Type': 'application/x-www-form-urlencoded'
#767
Comments
We don't support matchers on non-JSON or XML bodies at this time. This could be marked as an enhancement, or (preferably) be supported via the new plugins process when ready. |
cc @uglyog |
Curious, is there an alternative way to implement checking
|
I'd need to check. It should support the content-type, just without matching rules. FYI see also this recent RFC: https://github.com/pact-foundation/roadmap/blob/master/rfc/99-define-matching-rules-for-form-urlencoded-body.md |
Matcher support (and generators) are now added to the core engine here: pact-foundation/pact-reference#462. This might mean things "just work" for this once the new FFI is updated in Note to review this once the new FFI is released. |
Software versions
Please provide at least OS and version of pact-js
@pact-foundation/karma-pact: 3.1.0,
@pact-foundation/pact: 9.16.5,
@pact-foundation/pact-web: 9.16.5,
Issue Checklist
Please confirm the following:
Expected behaviour
When using pact-web, matchers should be able to be used in the body when the content type is application/x-www-form-urlencoded.
Actual behaviour
Mock server logs report the following:
I believe this is related to #633.
Steps to reproduce
Create a test with the following interaction:
The above test will fail with the log error noted earlier.
Contrast that with this interaction, which will pass:
Relevant log files
The text was updated successfully, but these errors were encountered: