Stream upload 'POST' in Spring WebClient
问题 I am uploading streams of (raw bytes) data using HTTP posts using WebClient: final byte[] rawData = IOUtils.toByteArray(sourceInputStream); webClient.post() .uri(uri) .contentType(MediaType.APPLICATION_OCTET_STREAM) .bodyValue(rawData) .exchange()... I am concerned there is a potentially a lot of memory used given sometimes these objects can be quite big (~200Mb) so would like to read directly from the InputStream and upload as a stream. I tried: bodyValue(BodyInserters.fromResource(new