Replace some value via getBodyContent()

getHttpBody() is deprecated

vsRequestBody = putV.getHttpBody() .

Suggest to use getBodyContent() and how to replace parameterized value in getBodyContent /?. There was method called replace() earlier which not working with getBodyContent.

Please suggest


public String getResponseBodyContent()

Get the response body content as a String

    Exception if errors happened

    the response body content as a String

getResponseBodyContent will return a string. Parse it with jsonSlurper into a map, apply any substitution you like, than rebuild the json with jsonOutput.

Or, simply use any method you like for substitution in a string (regex based etc)