Karate mock - how to match against request body content
问题 With Karate, I'm trying to work out how to return different mock responses based on the content of the request body. I've got Feature: ... Scenario: pathMatches('/users/login') && methodIs('post') && request == {"username": "gooduser", "password": "goodpassword"} * def responseStatus = 200 * def response = {"status: login ok"} Scenario: pathMatches('/users/login') && methodIs('post') && request == {"username": "baduser", "password": "badpassword"} * def responseStatus = 401 * def response = {