Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8213412

The example in blog using method asFile(Path) is undefined for the type HttpResponse.BodyHandler

    XMLWordPrintable

    Details

      Description

      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.

        Attachments

          Activity

            People

            Assignee:
            chegar Chris Hegarty
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: