core/play/src/main/java/play/http/HttpEntity.java
public static final HttpEntity fromString(String content, String charset) {
    return new Strict(
        ByteString.fromString(content, charset), Optional.of("text/plain; charset=" + charset));
  }
public static final HttpEntity fromString(String content, String charset) {
    return new Strict(
        ByteString.fromString(content, charset), Optional.of("text/plain; charset=" + charset));
  }
Create an entity from the given String.

@param content The content.
@param charset The charset.
@return the HTTP entity.