static HttpRequest of(HttpMethod method, String path, MediaType mediaType, HttpData content,
                          HttpHeaders trailers) {
        requireNonNull(method, "method");
        requireNonNull(path, "path");
        requireNonNull(mediaType, "mediaType");
        return of(RequestHeaders.builder(method, path)
                                .contentType(mediaType)
                                .build(),
                  content, trailers);
    }
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
@param trailers the HTTP trailers
core/src/main/java/com/linecorp/armeria/common/HttpRequest.java