Refactor response generation and xmls

This commit is contained in:
Dominik Adam Przybysz 2014-12-13 21:49:24 +01:00
parent ba63d36fa0
commit 0bfa0d91b4
8 changed files with 50 additions and 36 deletions

View file

@ -13,6 +13,7 @@ import org.apache.http.util.EntityUtils
class Util {
static GPathResult extractXmlResponse(CloseableHttpResponse response) {
HttpEntity entity = response.entity
GPathResult xml = new XmlSlurper().parseText(EntityUtils.toString(entity))
EntityUtils.consumeQuietly(entity)
return xml