Hi all, is there any way to mock a POST request with a JSON payload? Right it seems that the Advanced Mock feature doesn’t seem to accommodate sending JSON to the request…let alone large JSON payloads
Hello, I tried it and Advanced Mock works correctly. My steps are as follows:
- Switch the environment to “Local Mock”;
- Configure Condition and Response Data in Mock Expectation of Advanced Mock;
- Send a request and get the Mock result successful.
It would be helpful if you could provide your steps and screenshots.
and the special characters and character escapes are supposed to be part of my payload
Hello, this is because there is a Backslash like (\n
) in the mock rule. So that the request value needs to include an (\
) to match the mock rule correctly. You can click on the ‘Request’ button next to the rule to view the request that matchs the rule.
Is the only difference between this payload and the payload I had the extra \
in front of the \n
?
“\n” is a special symbol, and we will look into the issue.