httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpRequest.java [216:273]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void setBody(final SimpleBody body) {
        this.body = body;
    }

    /**
     * Sets the message body and content type.
     *
     * @param bodyBytes request body.
     * @param contentType request content type.
     */
    public void setBody(final byte[] bodyBytes, final ContentType contentType) {
        this.body = SimpleBody.create(bodyBytes, contentType);
    }

    /**
     * Sets the message body and content type.
     *
     * @param bodyText request body.
     * @param contentType request content type.
     */
    public void setBody(final String bodyText, final ContentType contentType) {
        this.body = SimpleBody.create(bodyText, contentType);
    }

    /**
     * Gets the request body.
     *
     * @return the request body.
     */
    public SimpleBody getBody() {
        return body;
    }

    /**
     * Gets the request content type.
     *
     * @return the request content type.
     */
    public ContentType getContentType() {
        return body != null ? body.getContentType() : null;
    }

    /**
     * Gets the request body as a String.
     *
     * @return the request body.
     */
    public String getBodyText() {
        return body != null ? body.getBodyText() : null;
    }

    /**
     * Gets the request body as a byte array.
     *
     * @return the request body.
     */
    public byte[] getBodyBytes() {
        return body != null ? body.getBodyBytes() : null;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



httpclient5/src/main/java/org/apache/hc/client5/http/async/methods/SimpleHttpResponse.java [103:128]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public void setBody(final SimpleBody body) {
        this.body = body;
    }

    public void setBody(final byte[] bodyBytes, final ContentType contentType) {
        this.body = SimpleBody.create(bodyBytes, contentType);
    }

    public void setBody(final String bodyText, final ContentType contentType) {
        this.body = SimpleBody.create(bodyText, contentType);
    }

    public SimpleBody getBody() {
        return body;
    }

    public ContentType getContentType() {
        return body != null ? body.getContentType() : null;
    }

    public String getBodyText() {
        return body != null ? body.getBodyText() : null;
    }

    public byte[] getBodyBytes() {
        return body != null ? body.getBodyBytes() : null;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



