Postman Mock Server matching algorithm logic for request body param form-data

1.1k Views Asked by At

Is there any option to send mock results depends on form data body value in postman?
I am sending some value in the body as form data and I have two example result and now the mock API return only one example I need to get the result based on the form data value from two examples

I have to call 2 Request with different body values(as form-data) and I need to return json array if the values are correct else I need to return a json object I have saved this two result but while I making mock API it is all ways sending now result only there is no changes in url

Is that possible to send response based on form-data in postman mock api?
I have an api example https://api.exmple.com and i am sending post request wit body form-data and filed check:false or check:true and i need to respond two json based on input filed check false or true how to do it?
When we do with get parameter it is working but not working with body form-data


Updates


I added this in header x-mock-match-request-body:true

Post man responding with this error message

{
    "error": {
        "name": "mockRequestNotFoundError",
        "message": "Double check your method and the request path and try again.",
        "header": "No matching requests"
    }
}



Update
I added postman api key but is not working but when i add
x-mock-response-name it is working but i need to x-mock-match-request-body only

0

There are 0 best solutions below