【发布时间】:2013-04-19 01:47:27
【问题描述】:
HTTP Builder 的 REST Client 返回一个 HttpResponseDecorator。如何从中获取原始响应(用于记录目的)?
编辑(一些代码可能很方便):
withRest(uri: domainName) {
def response = post(path: 'wsPath', query: [q:'test'])
if (!response.success) {
log.error "API call failed. HTTP status: $response.status"
// I want to log raw response and URL constructed here
}
【问题讨论】:
标签: groovy httpresponse httpbuilder