static HttpRequest of(HttpMethod method, String path, MediaType mediaType, String content) {
        requireNonNull(content, "content");
        requireNonNull(mediaType, "mediaType");
        return of(method, path, mediaType,
                  HttpData.of(mediaType.charset(StandardCharsets.UTF_8), content));
    }
Creates a new HTTP request and closes the stream.

@param method the HTTP method of the request
@param path the path of the request
@param mediaType the {@link MediaType} of the request content
@param content the content of the request
core/src/main/java/com/linecorp/armeria/common/HttpRequest.java