Forum Discussion

rbernhard1's avatar
rbernhard1
Occasional Visitor
6 months ago

Virtual Service - Dynamic Creation of Mock Response inside Groovy

I am looking for a dynamic creation of Mock Response based on request input.

I know the way to define predefined responses and then just return there name to return them as response.

But i would like to create the entire response by setting:

  • Content Type
  • Set Body
  • Set Response Headers

inside groovy script.

Unluckily i could not find any example to do that.

Any help would be highly appreciated.

No RepliesBe the first to reply