Currently, I'm getting HttpResponseException, which has only statusCode. How can I get complete body of response?
Here is code I'm using
restClient = new RESTClient("http://${Server}")
try {
HttpResponseDecorator resp = restClient.post(path,body,requestContentType)
as HttpResponseDecorator
return JSONObject.fromObject(resp.getData()).get("topKey","");
}
catch (HttpResponseException e) {
error(e.toString())
}
And it only output this:
[oaf.error] groovyx.net.http.HttpResponseException: Internal Server Error
data
is not already included inresp
, given thatresp.setData()
is a non-public method. – Hadden