code: @Override
      public String getResponseBodyAsString() throws IOException {
          byte[] rawdata = null;
          if (responseAvailable()) {
              rawdata = getResponseBody();
          }
          if (rawdata != null) {
              return EncodingUtil.getString(rawdata, getResponseCharSet());
          } else {
              return null;
          }
      }
docs: Returns the response body of the HTTP method, if any, as a {@link String}.
  If response body is not available or cannot be read, returns <tt>null</tt>
  The string conversion on the data is done using the character encoding specified
  in <tt>Content-Type</tt> header. Buffers the response and this method can be
  called several times yielding the same result each time.
  
  Note: This will cause the entire response body to be buffered in memory. A
  malicious server may easily exhaust all the VM memory. It is strongly
  recommended, to use getResponseAsStream if the content length of the response
  is unknown or resonably large.
  
  @return The response body or <code>null</code>.
  
  @throws IOException If an I/O (transport) problem occurs while obtaining the
  response body.