Katalon gives you a feature to verify your web request. I want to know if there is any other way to store httpbody in variable since getHttpBody() is deprecated after 5.5.
I tried other methods but that doesn’t seems to working.
please refer screenshot for more info.
below code is something you can try and check verification log that it prints a POST request body content.
import static org.assertj.core.api.Assertions.*
import com.kms.katalon.core.util.KeywordUtil as KeywordUtil
import internal.GlobalVariable as GlobalVariable
RequestObject request = WSResponseManager.getInstance().getCurrentRequest()
ResponseObject response = WSResponseManager.getInstance().getCurrentResponse()
String b= request.httpBody.toString()