pact-foundation / pact-js

JS version of Pact. Pact is a contract testing framework for HTTP APIs and non-HTTP asynchronous messaging systems.
https://pact.io
Other
1.63k stars 349 forks source link

Consumer test using application/x-www-form-urlencoded content type is being serialised as JSON #1233

Open sandy-may opened 3 months ago

sandy-may commented 3 months ago

Software versions

Please provide at least OS and version of pact-js

Issue Checklist

Please confirm the following:

Expected behaviour

The request body is passed through to the mock server respecting the Content-Type set in the request header of the Pact Interaction

Actual behaviour

It is being serialised into JSON. Log from the express mock server: { '{"grant_type":"client_credent': '' }

Steps to reproduce

How can someone else reproduce this bug? https://github.com/J-son1/pact-url-encoded-bug Guidance hopefully in Readme

Relevant log files

Log file with level set to debug: pact-content-type-bug.txt