API mock raw body sub tab
This sub tab is used to match the request body in raw format of the incoming mock request. A sample screenshot is as below:
Note: Make sure that `Enabled` checkbox is ticked otherwise parameters defined in Parameters sub tab will be used only to match the incoming web request.
In the above example, mock server will do the following:
- Mock server will check that there are exactly 3 keys as specified in this tab, in the request body of the incoming mock request.
- Mock server will check the name key of the request body of incoming mock request should be equal to "John Doe".
Now,
- If any of the above conditions fails then mock server will ignore this API mock and move on to the next API mock.
- And if the above conditions matches, then mock server will assign the actual values of email and designation from the incoming mock request into the specified variables.
- And these variables can be used to construct the API response.