-
Task
-
Resolution: Not an Issue
-
P4
-
None
-
11
A DESCRIPTION OF THE PROBLEM :
The method asFile(Path) is undefined for the type HttpResponse.BodyHandler
Following URL https://blogs.oracle.com/java/jdk-http-client and wrote code as it is in mentioned site
HttpResponse<Path> response =
client.send(request, BodyHandler.asFile(Paths.get("body.txt")));
It says The method asFile(Path) is undefined for the type HttpResponse.BodyHandler
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should be able to save the response in a File
ACTUAL -
Not able as asFile is not defined.
The method asFile(Path) is undefined for the type HttpResponse.BodyHandler
Following URL https://blogs.oracle.com/java/jdk-http-client and wrote code as it is in mentioned site
HttpResponse<Path> response =
client.send(request, BodyHandler.asFile(Paths.get("body.txt")));
It says The method asFile(Path) is undefined for the type HttpResponse.BodyHandler
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Should be able to save the response in a File
ACTUAL -
Not able as asFile is not defined.