public String getBodyText() {
        if (bodyAsBytes != null) {
            final Charset charset = (contentType != null ? contentType : ContentType.DEFAULT_TEXT).getCharset();
            return new String(bodyAsBytes, charset != null ? charset : StandardCharsets.US_ASCII);
        }
        return bodyAsText;
    }
Gets the body as a String.

@return the body as a String.
httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleBody.java