Forum Discussion

Manojaj's avatar
Manojaj
New Contributor
12 months ago

Groovy script for dynamic response in Readyapi

Our scope of need is to get a dynamic response if the user hits the API request incorrectly and they need to get different response. I have created in readyapi rest, soap, and jdbc protocols with static responses when the user wants to access the response, but when the user requests with payload incorrectly example ( wrong I'd -xxxxx) , they receive the same response from readyAPI. I would like to create script to handle dynamic response; could you please share an example?