Groovy HTTPBuilder : Getting the entity content from a GZIPed Chunked response
问题 I need to send a POST request to a web server and be able to read the response sent by said server. I tried using the HTTPBuilder lib with this code : def http = new HTTPBuilder('http://myServer/') http.setProxy("Proxy_IP", 8080, "http") postBody = [cmd:'e',format:'sep',c:'a',b:'b',t:'u',r:'r',kl:'lop'] http.post( body: postBody, requestContentType: URLENC ){ resp -> HttpEntity he = resp.getEntity() println "${resp.getAllHeaders()}" println he.getContentType() println "${resp.getEntity()