Hiện tại, tôi nhận được HttpResponseException, chỉ có statusCode. Làm cách nào tôi có thể nhận được phản hồi đầy đủ?Cách nhận phản hồi hoàn chỉnh cho phản hồi Groovy RestClient không thành công
Đây là mã Tôi đang sử dụng
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())
}
Và nó chỉ kết quả này:
[oaf.error] groovyx.net.http.HttpResponseException: Internal Server Error