Forum Discussion
- JoostDGFrequent Contributor
Hi apartamsetti .
I don't really see/understand the use case to do that... You want to: Given a certain condition execute either a POST or a GET?
Can't you then not define those POST & GET methods in your ReadyAPI "APIs" section and then in your test case perhaps use a script to execute "given condition X run test step "POST" else run test step "GET" "?
- apartamsettiNew Contributor
Actually i defined Post Endpoint in API's and in the test case if i want to modify the verb to GET using groovy script is it possible? This is my one of my test scenario. Not sure i think it may not be possible to change the defined verb.
Thank you for your reply..
- nmraoChampion Level 3
I echo the same thoughts as JoostDG .
Here is groovy way to send the REST requests using this groovy-ws-lite library
https://github.com/jwagenleitner/groovy-wslite
Please explore.
- apartamsettiNew Contributor
Thank you definitely i will go explore it.
Related Content
- 8 months ago
- 2 years ago
- 5 years ago