I have setup a mock server in Postman.
For a request X, I have added 2 examples (responses)
When I use x-mock-response-code I am able to get the appropriate response.
But when I dont use the x-mock-response-code, I am always getting 400 Bad Request. I am expecting 200 by default. But its not happening.
Do I need to add some thing to example response ? I tried to change example name as Default but no use..
If your example requests are identical, Postman will deterministically return the response for one of them. There is no concept of 'default' examples at this time. If you want a particular response to be returned, make sure your example requests are not identical and only one example request matches the request you are sending. Or use the x-mock-response-code header as you are already doing.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With