Skip to main content The Trailblazer Community will be unavailable from 2/1/2025 to 2/2/2025. Please plan your activities accordingly.
I just need to provide mock responses for the all the REST API's I'm developing and I'll be sendingmock=true in the request parameter. If mock=true, then it should bypass the logic in apex code and just send the response. what is the best way to achieve this?

What I'm doing right now is, I'm just looking for the mock parameter and if true, sending the response back. So I'm storing the dummy JSON in a variable to send it back. Is there any other approach?
1 answer
0/9000