I would like to reuse a feature both for POST-ing and PUT-ing a JSON Object. In order to achieve that I am trying to use a condition in the call:
Given param admin = admin
And request role
When method (role.id == null) ? karate.POST : karate.PUT
The error I get:
no step-definition method match found for: method (role.id == null) ? karate.POST : karate.PUT
I checked the documentation and the examples and search for the solution here, but I did not find an answer to this question. Thanks in advance for the help.