public static Reader getResponseContentAsReader(@NotNull HttpMethod response) throws IOException {
    //if (!response.hasBeenUsed()) {
    //  return new StringReader("");
    //}
    InputStream stream = response.getResponseBodyAsStream();
    String charsetName = null;
    org.apache.commons.httpclient.Header header = response.getResponseHeader(HTTP.CONTENT_TYPE);
    if (header != null) {
      // find out encoding
      for (HeaderElement part : header.getElements()) {
        NameValuePair pair = part.getParameterByName("charset");
        if (pair != null) {
          charsetName = pair.getValue();
        }
      }
    }
    return charsetName != null ? new InputStreamReader(stream, charsetName) : new InputStreamReader(stream, DEFAULT_CHARSET);
  }
public static Reader getResponseContentAsReader(@NotNull HttpMethod response)