I’m trying to see what the request payload being sent looks like in the verification log. I really just want to print all request and response payloads for every request but for some reason none of the methods I’ve tried are working.
I can get the response payload to print to the verification log using println(response.getResponseBodyContent()) but *println(request.getBodyContent()) doesn’t work at all. My verification log doesn’t show any errors or anything and it states that the print worked but it’s not printing the request payload.
import static org.assertj.core.api.Assertions.* import com.kms.katalon.core.testobject.RequestObject import com.kms.katalon.core.testobject.ResponseObject import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS import com.kms.katalon.core.webservice.verification.WSResponseManager import com.kms.katalon.core.util.KeywordUtil import groovy.json.JsonSlurper import internal.GlobalVariable as GlobalVariable import com.kms.katalon.core.testobject.impl.HttpTextBodyContent RequestObject request = WSResponseManager.getInstance().getCurrentRequest() println(request.getBodyContent()) ResponseObject response = WSResponseManager.getInstance().getCurrentResponse() println(response.getResponseBodyContent()) assert response.getStatusCode() == 200