There is a bug in Groovy version up to 2.3.7. HTTPBuilder is not able to automatically parse chunked response to JSON format. If external server returns response with header:
Transfer-Encoding : chunked
Usually applied code:
def http = new HTTPBuilder(url)
def result = http.request(POST, JSON) { req ->