A DESCRIPTION OF THE PROBLEM :
The first example of usage of the class java.net.http.HttpResponse.BodySubscribers states: "// Streams the response body to a File" but the subsequent code does instead accumulate the response body as a byte array.
Expected something like:
HttpResponse<Path> response =client.send(request, responseInfo -> BodySubscribers.ofFile(path));
The first example of usage of the class java.net.http.HttpResponse.BodySubscribers states: "// Streams the response body to a File" but the subsequent code does instead accumulate the response body as a byte array.
Expected something like:
HttpResponse<Path> response =client.send(request, responseInfo -> BodySubscribers.ofFile(path));