static HttpData of(Charset charset, String text) {
        requireNonNull(charset, "charset");
        requireNonNull(text, "text");
        if (text.isEmpty()) {
            return empty();
        }

        return wrap(text.getBytes(charset));
    }
Converts the specified {@code text} into an {@link HttpData}.

@param charset the {@link Charset} to use for encoding {@code text}
@param text the {@link String} to convert

@return a new {@link HttpData}. {@link #empty()} if the length of {@code text} is 0.
core/src/main/java/com/linecorp/armeria/common/HttpData.java