<#1233 Consumer test using application/x-www-form-...
# pact-js-development
g
#1233 Consumer test using application/x-www-form-urlencoded content type is being serialised as JSON Issue created by sandy-may Software versions Please provide at least OS and version of pact-js • OS: _e.g. Mac OSX 14.5 • Consumer Pact library: _e.g. Pact JS v13.1.1 • Provider Pact library: e.g. pact-jvm-provider-maven2.11 v 3.3.8 n/a • Node Version: v20.16.0 Issue Checklist Please confirm the following: • I have upgraded to the latest • I have the read the FAQs in the Readme • I have triple checked, that there are no unhandled promises in my code and have read the section on intermittent test failures • I have set my log level to debug and attached a log file showing the complete request/response cycle • For bonus points and virtual high fives, I have created a reproduceable git repository (see below) to illustrate the problem 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 pact-foundation/pact-js