@UnstableApi
    static FutureResponseAs<ResponseEntity<Path>> path(Path path) {
        requireNonNull(path, "path");
        return response -> {
            final SplitHttpResponse splitResponse = response.split();
            final CompletableFuture<Void> future = StreamMessages.writeTo(splitResponse.body(), path);

            return allAsList(ImmutableList.of(splitResponse.headers(), future, splitResponse.trailers()))
                    .thenApply(objects -> {
                        final ResponseHeaders headers = (ResponseHeaders) objects.get(0);
                        final HttpHeaders trailers = (HttpHeaders) objects.get(2);
                        return ResponseEntity.of(headers, path, trailers);
                    });
        };
    }
Writes the content of an {@link HttpResponse} into the specified {@link Path}.
core/src/main/java/com/linecorp/armeria/client/ResponseAs.java