Forum Discussion
rupert_anderson
9 years agoValued Contributor
Hi,
If you mean can you set up a mock with a resource e.g. /quote/task/{id} so that you can do GET requests like /quote/task/12345. Then I would set the mock up like:
And then to get the id parameter value, use some Groovy script in the Dispatch(Script) e.g.
def id = mockRequest.getPath().split("/")[-1]
log.info "id: " + id
Then you can use the id to selectively return responses:
if (id=="12345") return "Quote12345Response"
Or use it for other tasks or include it in the response etc.
Is this what you mean?
Cheers,
Rupert
- shashankalst6 years agoNew Contributor
This does not work when deployed as war!
Related Content
Recent Discussions
- 6 hours agoruchisingh