How can I serialize or otherwise transform the parsed result of httpPost()
calls so that the content is fully represented in the log and can be more useful in debugging?
I have the following code in a driver:
httpPost( [uri: uri, path: '/1Wire/Search.html', body: body, requestContentType: 'application/x-www-form-urlencoded'] ) { resp ->
if (resp.success) {
processSensors(resp.data)
}
if (logEnable)
if (resp.data) log.debug "${resp.data}"
}
Currently, the log.debug() call results in some text from the parsed response, but it does not show the pretty form of the parser response: