For each route, multiple responses can be defined (status, body, and headers) and triggered using a set of rules.
To add a new response to your route, click on the "plus" icon next to the responses list:
You can also duplicate an existing route response by clicking on the "copy" icon on the right:
Everything will be copied to the new response: documentation, file/body, headers and rules.
There is always at least one response when you create a new route. You can modify it and add more responses. But you can never delete the last route response.
Without rules or when a request does not match the one you defined, the default response will always be the first one in the list. You can easily change the default response by reordering the responses menu with a drag and drop:
Mockoon can serve the route responses randomly (200, 500, 404) to simulate an unpredictable behavior.
To activate this option, click on the "shuffle" icon next to the response list:
Mockoon can serve the route responses sequentially (200 → 500 → 404). Mockoon will serve all the responses one after the other and restart at the beginning. The sequence is reset when restarting the server.
To activate this option, click on the "repeat" icon next to the response list: